Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
VIP: Change Mapping Syntax #564
Mapping syntax looks very similar to the array syntax, so we should change the syntax so it is not confusing
Change Mapping Syntax to
Nested map Syntax to look as follows:
Not Backwards compatible
Copyright and related rights waived via CC0
EDIT: Previous proposed syntax was
The harder part is how to represent the access e.g.
There's also something like this in Haskell (I believe):
I'm actually a fan of the syntax now. It's one of the things that I genuinely think is an improvement over most major languages. It's short, simple, and intuitive once you do it once or twice.
It could be interesting to use something else to enclose it perhaps. Maybe a declaration along the lines of