I know this is all syntactic sugar, but syntactic sugar for common stuff is nice. Multiple assigment:
(= (x y) (list 1 2)) And I think a symbol should be chosen for the list function. The reason being that we have 3 ways of defining a list at the moment:
list, where all elements are evaluated, except for quoted ones.
quote, where no element is evaluated.
quasi-quote, where all elements are not evaluated unless preceded with a , or ,@ I can't think of a good reason not to give the list function a symbol as well. Not sure which symbol should be used. If { and } aren't already being used, they could be used for hash tables. It would also allow hashtables to be printable in a way that can be read back in. Something that should be researched is if having an array type is not a premature optimization. An array is basically a hashtable with number as keys. For speed, a hybrid array/hashtable could be used in the implementation, like in Lua. If people really want to define bounds for an array (to detect errors in code, for instance), there could be a function that prevents new keys from being assigned to a hashtable without destroying it/calling a function that allows new keys to be added. |