That being said, I wonder how data types would work as opposed to lists. What would a language based around maps look like?
That being said, I wonder how data types would work as opposed to lists. What would a language based around maps look like?
They call "maps" tables. Even arrays in Lua are tables, as are everything else.
Pretty cool concept... And there's even a low level, statically typed, system language that uses Lua as a composer language, Terra: http://terralang.org
In Terra, you manipulate your program using Lua at compile time. Really cool concept.
I keep thinking code blocks and the struct/map definition could possibly both use `{ ... }`, which might appear a bit like some other languages? What about function calling and definitions?
The S-Expr thing seems to indicate you’d still need a “head” then a list of key-value pairs?
[sendMessage with:arg1 to:arg2]
The relational calculus is an incredibly powerful formalism though, and it's definitely one that has an important place in serious software development.
But if you start with maps, then you can represent a list as a special case of a map in which the keys are integers that get incremented, starting at 0.