Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Lil

< >

Lil, aka Learning In Layers, is an open source programming language created in 2022 by John Earnest.

#282on PLDB 2Years Old
Download source code:
git clone https://github.com/JohnEarnest/Decker
Homepage · REPL · Source Code · Docs

Lil is part of the technology that powers Decker, a multimedia creative tool inspired by HyperCard. Decker uses Lil for adding custom behavior to decks and the widgets within. Lil is designed to be learned in layers, but it is a richly multi-paradigm language which incorporates ideas from imperative, functional, declarative, and vector-oriented languages.


Example from the web:
on mode a do # line comment r:() each x in a r[x]:1+r[x] end first extract key orderby value desc from r end
floor cos sin tan exp ln sqrt count first last sum min max raze prod range keys list rows cols table typeof flip mag unit heading split fuse dict take drop in join cross parse format unless limit like window each in while on do end if elseif else where by orderby asc desc select extract update from insert with into send local

Language features

Feature Supported Example Token
Standard Library ✓ print["Hello, World!"]
Function Composition ✓ on o f g do on _ x do f[g[x]] end end
Print() Debugging ✓ show["Hi"]
Multiline Strings ✓ lines:"one two"
Infix Notation ✓ six: 2 + 2 + 2
Assignment ✓ local name: "John" :
First-Class Functions ✓ (on f x do x,x end)@11,22,33
Method Chaining ✓ image[3,4].map[0 dict 1].encoded
Binary Operators ✓ 1 + 1
Expressions ✓ 1 + 1
Lists ✓ myList:(1,2,3) end
Integers ✓ 80766866
Conditionals ✓ if 1 print["true"] end
Functions ✓ on myFunction do print["hello"] end
While Loops ✓ while 1 print["hello"] end
Strings ✓ "Hello World" "
Line Comments ✓ # A comment #
Case Sensitivity ✓
Implicit Type Casting ✓
Garbage Collection ✓
Dynamic Typing ✓
Zero-based numbering ✓
Comments ✓
Constants X
Labels X
Classes X
Semantic Indentation X
Booleans X
Directives X
Operator Overloading X
Function Overloading X
Macros X
Anonymous Functions X
Case Insensitive Identifiers X
Multiple Inheritance X
Inheritance X
Switch Statements X
Ternary operators X
Increment and decrement operators X
Methods X
Default Parameters Pattern X
Destructuring X
Sets X
Octals X
Hexadecimals X
Scientific Notation X
- Build the next great programming language · Add · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements · Part of the World Wide Scroll