# The Alice book

> Learn Alice from your first program to .NET applications, with an interactive language and library reference.

Canonical: https://alice-lang.org/documentation/

[Documentation index](https://alice-lang.org/documentation/llms.txt) · [Complete book](https://alice-lang.org/llms-full.txt)

Alice combines Ruby-inspired syntax with static types and the .NET ecosystem. Write scripts, libraries, web services, games, and numerical programs in `.al` files. The compiler checks your code and produces ordinary .NET assemblies.

This book is a learning path and a reference. Start at the beginning, or use the chapter list and search to find a particular feature.

[Start with Alice](https://alice-lang.org/documentation/learn/installation.md) — Install the tools, write a program, and make a project.

[Take the language tour](https://alice-lang.org/documentation/learn/tour.md) — Edit and run small programs as you learn the syntax.

[Language reference](https://alice-lang.org/documentation/language/programs.md) — Types, methods, blocks, objects, patterns, and their rules.

[Build with .NET](https://alice-lang.org/documentation/guides/dotnet.md) — Use existing libraries and connect Alice with C#.

## Try a program

Every **Edit & run** example opens the Alice playground inside the page. Change the code, press **Run**, and read the output. The compiler runs in your browser; the .NET runtime starts when you press Run. **Open in playground** gives you a full editor and the HIR, MIR, C#, and IL inspection tabs.

```alice
def greet(name : String) : String
  "Hello, #{name}!"
end
puts greet("Alice")
```

Expected output:

```text
Hello, Alice!
```

[Edit and run in the Alice playground](https://playground.alice-lang.org/#code=u.ZGVmIGdyZWV0KG5hbWUgOiBTdHJpbmcpIDogU3RyaW5nCiAgIkhlbGxvLCAje25hbWV9ISIKZW5kCnB1dHMgZ3JlZXQoIkFsaWNlIik)

The source and expected output are also readable without JavaScript. Browser examples use the playground's compiler; installed tools use your selected local toolchain. If behavior differs, compare the versions before changing your program.

## Read in order

1. **Start here:** [installation](https://alice-lang.org/documentation/learn/installation.md), [first program](https://alice-lang.org/documentation/learn/first-program.md), [tour](https://alice-lang.org/documentation/learn/tour.md), [first project](https://alice-lang.org/documentation/learn/first-project.md).
2. **Language:** [program structure](https://alice-lang.org/documentation/language/programs.md), [values](https://alice-lang.org/documentation/language/variables.md), [types](https://alice-lang.org/documentation/language/types.md), [control flow](https://alice-lang.org/documentation/language/control-flow.md), [methods](https://alice-lang.org/documentation/language/methods.md), and [blocks](https://alice-lang.org/documentation/language/blocks.md).
3. **Data and behavior:** [classes](https://alice-lang.org/documentation/language/classes.md), [records](https://alice-lang.org/documentation/language/records.md), [modules](https://alice-lang.org/documentation/language/modules.md), [generics](https://alice-lang.org/documentation/language/generics.md), and [patterns](https://alice-lang.org/documentation/language/pattern-matching.md).
4. **Library:** [collections](https://alice-lang.org/documentation/library/collections.md), [strings](https://alice-lang.org/documentation/library/strings.md), [numbers](https://alice-lang.org/documentation/library/numbers.md), [files and JSON](https://alice-lang.org/documentation/library/io.md), and [numerical tools](https://alice-lang.org/documentation/library/numerics.md).
5. **Applications:** [.NET libraries](https://alice-lang.org/documentation/guides/dotnet.md), [web APIs](https://alice-lang.org/documentation/guides/web.md), [games](https://alice-lang.org/documentation/guides/games.md), [testing](https://alice-lang.org/documentation/guides/testing.md), and [performance](https://alice-lang.org/documentation/guides/performance.md).

## Go deeper

Read [memory and value semantics](https://alice-lang.org/documentation/advanced/memory.md) to understand references, copies, managed allocation, and the limits of `val`. Then work through [resource lifetimes](https://alice-lang.org/documentation/advanced/resources.md), [spans and pooled buffers](https://alice-lang.org/documentation/advanced/buffers.md), [allocation measurement](https://alice-lang.org/documentation/advanced/profiling.md), and [secure applications](https://alice-lang.org/documentation/advanced/security.md).

## Find an answer

Use the left sidebar for chapters, **On this page** for sections, and search (`Ctrl K` or `⌘ K`) for a name or concept. The previous and next links follow the book's reading order. Each page has an edit link to its source.

For a failure, start with [diagnostics](https://alice-lang.org/documentation/reference/diagnostics.md). For commands or configuration, use the [CLI](https://alice-lang.org/documentation/tools/cli.md) and [manifest](https://alice-lang.org/documentation/tools/manifest.md) references. For completion and diagnostics in your editor, see [editor setup](https://alice-lang.org/documentation/tools/editors.md).

## Version and scope

Alice is under active development in the `0.1x` series. This book describes the current source and identifies limitations where a feature is incomplete or environment-dependent. It does not treat proposed ownership or memory-safety designs as language features. Run `alice version` to identify your installation and consult [toolchains](https://alice-lang.org/documentation/tools/toolchains.md) when a newer feature is needed.

## Continue reading

- Next: [Install Alice](https://alice-lang.org/documentation/learn/installation.md)
