Closed sirisian closed 7 years ago
Since [(10, 20), 30] is really just [20, 30] if this has any chance of working it would have to be introduced with the spec: https://github.com/sirisian/ecmascript-types#initializer-list-for-array-of-class-instances
This is very context sensitive. Basically it would notice the array in the assignment and have custom grammar for associating it. There's already this suggested syntax for implicit casting: https://github.com/sirisian/ecmascript-types#implicit-array-cast
I'm making efforts to ensure I'm not adding something in my design where it blocks something obvious in the future. This might need to be in a future spec since it adds weird syntax with parenthesis in arrays. Some other feature might utilize this syntax better. Lambads already kind of take part of the syntax though. [() => {}] type stuff.