alan icon indicating copy to clipboard operation
alan copied to clipboard

Add hashmap constructor syntactic sugar

Open dfellis opened this issue 4 years ago • 0 comments

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).

dfellis avatar Sep 11 '20 02:09 dfellis