Learn Toit
Toit is an object-oriented, garbage-collected language for scripting on your computer and programming connected devices. You can use the same language for a command-line tool, a network service, or an application on a microcontroller.
Choose your starting point
| Your experience | Start here | What you will learn |
| Already comfortable programming | Toit for programmers | A complete language tour, with comparisons to C/C++, JavaScript, Python, and Java/Kotlin. |
| New to programming | Beginner lessons | Build a temperature report step by step, then add lists, functions, and objects. |
The programmer's tour explains Toit directly; you do not need to know every language used for comparison. Familiar features are covered briefly, while Toit-specific concepts receive more explanation and examples.
The C/C++ introduction covers the language from a native programmer's starting point. The JavaScript and Python guides focus on differences from those languages. Use the comparison cheat sheet for side-by-side syntax lookup.
Look up a language feature
The language reference is organized by topic. It assumes you can already read a small Toit program; it is not a sequence of lessons. Use it for syntax rules, edge cases, and more detailed examples.
Find a topic
The topics from the earlier language introduction are now covered in the lessons and programmer's tour. These links also keep its section bookmarks useful.
| Topic | Continue reading |
| Your first program | Read the explanation |
| Functions | Read the explanation |
| String interpolation | Read the explanation |
| Function arguments | Read the explanation |
| Creating objects | Read the explanation |
| Fields and methods | Read the explanation |
| Reporting a list of values | Read the explanation |
| Comments and indentation | Read the explanation |
| List iteration | Read the explanation |
| Named arguments | Read the explanation |
| Conditions and expressions | Read the explanation |
| Loops | Read the explanation |
| Maps and sets | Read the explanation |
| Blocks and lambdas | Read the explanation |
| Block parameters | Read the explanation |
| Block and lambda results | Read the explanation |
Use Toit in a project
For a host script or command-line tool, save your program in a .toit file
and run it with toit run. Use the
package quick start to add dependencies.
For an ESP32 application, run on your device. The hardware and networking tutorials list their additional setup requirements.