4 ms·
If I were using a Lisp these days, I'd really miss the Lua table. Lisp is built around cons cells and the linked list. But it has seperate containers of variou
by ansible 15y ago
If I were using a Lisp these days, I'd really miss the Lua table.
Lisp is built around cons cells and the linked list. But it has seperate containers of various types.
Lua is built around the Lua table, which can function as a list, array, and dictionary/hash table. You can then build any other data structure from tables easily. With a metatable, you then also get read-only tables, objects and classes, and more.
Now if someone were to design a modern Lisp based around tables...
- moonchrome 15y ago>Now if someone were to design a modern Lisp based around tables... Check out clojure - advanced data structures/primitives + immutability(functional programming)
- ansible 15y agoI don't really want multiple data structure primatives though, just the one. And have the language built up around it. I have been mulling over better support for immutable data structures in Lua, but I haven't figured out a good and clean design yet.
- gruseom 15y agoNow if someone were to design a modern Lisp based around tables... I agree, it's an intriguing possibility. There was a thread about this a while ago: http://news.ycombinator.com/item?id=3291065 http://news.ycombinator.com/item?id=3291065