The nuttiest of langs.
Base code from Writing An Interpreter In Go. You might recognize Monkey Language or similar names, but I wanted to give it my own name.
The goal is to improve the language far enough to solve a couple of leetcode or advent of code problems, comfortably.
After following the book I ended up with these features:
- integers
- booleans
- strings
- arrays
- hashes
- prefix-, infix- and index operators
- conditionals
- global and local bindings
- first-class functions
- return statements
- closures
The number of built-in functions are relatively sparse.
- len (strings and arrays)
- push
- first
- last
- rest (copy array, without the first element)
- puts (print to STDOUT)
This is a list of things I feel are missing for it to be considered a limited, but still somewhat complete language
- Value Assignment (meaning re-assignment, after let statement)
- Arrays
- Hashes
- Integers
- File IO
- Read file content
- Floats
- <= and >=
- for(& while) loop
- Pop
- Remove
- Shift
- Unshift
- includes
- Random
- Min
- Max
- Modulo
- split
- trim
- includes
- escaped chars
- &&
- ||