This is not described in the blogpost so maybe I don’t know where to look but what is going to happen to
[x, ...xs] both in terms of adding an element to the head of the list and pattern matching?
I assume (based on the comparison to js) that we’ll be able to pattern match on arrays now but based on the footnote in that section the compiler will always give a warning that array might not be of the length we’re trying to ‘destructure’. How does it work with pattern matching?
How will pattern matching look for lists (wether using
list[...] or any other “prefix”) and when potentially unified with the likes of
map[...] how will the “pattern-match”-ability be communicated (as you should be able to pattern match on lists but not on maps)?
NB: Rust has
vec![...] which looks very similar so the syntax doesn’t really scare me. However in rust this is a macro and it’s not baked into the language.