Hi Tyson,

Interesting proposal, but I was going to reply with the exact same response
as Rowan. Why not use DTOs for such purposes? Arrays have rather limited
use cases. If you need to return multiple results from a function then you
should return an object with typed properties.
I don't like the idea of adding yet another syntax for creating arrays,
especially one with limitations. If your array keys contain spaces or
special characters then you need to use the current syntax. Adding to the
fact that arrays have no type safety, I don't see much use for the newly
proposed syntax.

I would prefer an improved syntax for creation of anonymous objects. This
is something which I have been annoyed with, myself.I'd like to see a
simple way of creating anonymous objects with typed properties.

Regards,
Kamil

Reply via email to