Getting Started
lil is a simple, fast programming language that can run scripts directly or compile them to standalone C binaries. If you know Python, you’ll find the syntax familiar but much simpler.
What Makes lil Different from Python
- No indentation rules. Use
{}for blocks, just like C. - No colons after
if,for,while, or function definitions. - No
selfparameter. No__init__. No classes at all. - No
returnkeyword. Functions return the value of their last expression. - No
importstatement. Useincludeto load other script files. - Variables are dynamically typed (like Python), but the compiler infers types for C codegen.
What to Read Next
- Installation - build and install lil
- Hello, World - your first lil script
- Basics - syntax overview
- What is lil? - language history and design goals