Toit is a programming language created in 2021 by Florian Loitsch and Kasper Lund.
| #335on PLDB | 5Years Old |
git clone https://github.com/toitlang/toitToit is a modern high-level language designed specifically for microcontrollers.
hi:
print "Hello World!"
greet name:
print "Hello $name!"
main:
hi
greet "Kasper"| Feature | Supported | Example | Token |
|---|---|---|---|
| Conditionals | ✓ | ||
| Strings | ✓ | "Hello" | |
| File Imports | ✓ | import .library import library import library show * | |
| While Loops | ✓ | while condition: | |
| Increment and decrement operators | ✓ | i++ | |
| hasForLoops | ✓ | for i := 0; i < end; i++: | |
| hasIfs | ✓ | if condition: | |
| Static Methods | ✓ | static foo x y | |
| Constants | ✓ | X ::= 0 | |
| Constructors | ✓ | constructor x: | |
| Inheritance | ✓ | class Foo extends Bar: | |
| Classes | ✓ | // Creating a custom class. class Point: x /int := 42 y /int := 103 | |
| Semantic Indentation | ✓ | ||
| Integers | ✓ | x := 0 |