alan
alan copied to clipboard
Add hashmap constructor syntactic sugar
Currently constructing new hashmaps is done with the newHashMap
function, which is weird. We have the syntax defined in ANTLR for "standard" key: val
declarations of a hashmap that we can switch to.
We can use newHashMap
or similar code under the hood when we switch to it, though "blessing" HashMap in this way in the language feels a bit wrong to me (it'd be nice if we could do something like this in the language itself, but I'm afraid the flexibility that would offer would Lisp/Perl6 the language out the gate).