Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 self parameter. No __init__. No classes at all.
  • No return keyword. Functions return the value of their last expression.
  • No import statement. Use include to load other script files.
  • Variables are dynamically typed (like Python), but the compiler infers types for C codegen.