ecmascript-immutable-data-structures
ecmascript-immutable-data-structures copied to clipboard
ImmutableSet literals
It's often nice to have literals for immutable sets, both for writing and for printing. This is obviously far less important than any of the semantics that you've laid out, but what about #<1 2 3>
for ImmutableSet literals? I'm of course partial to Clojure's #{1 2 3}
syntax, but that's taken in this proposal already.
Alternatively it could be similar to how numer literals were extended:
set#[1, 2, 3]
or
#set[1, 2, 3]