Description
I really miss the ability to simply note down a literal array.
As far as I can see, the spec only talks about arrays in very few places, and uses the {2. 4. 5}
notation. That is a list of expressions, of which their return value defines the value of the corresponding array index.
So, {self foo. 4 + 3. a <-: hello: 'ww'}
is perfectly legal, and might evaluate to {self. 7. a Promise}
.
What's unclear is how we can have value arrays supported as well.
Perhaps one option would be to use the #
sign as an indicator, and make #{2. 4. 5}
a value array. That's somewhat in Smalltalk tradition of #(foo bar 42)
evaluating to {#foo. #bar. 42}
, except that Smalltalk doesn't have ValueArray
s, and this seems merely a convenience to note down a list of symbols without too much syntactical noise. Not sure I really care for such symbol arrays.