Naveen Chawla (2017-07-31T05:40:12.000Z)
naveen.chwl at gmail.com (2017-08-01T07:23:23.182Z)
If ES ever introduces a way of customizing key equality in Maps, then the literal syntax would have to be updated to include that "comparator" function. Also, curly braces with colons that separate the keys and values currently denote objects, whose keys are limited in type. Maps can have objects, booleans etc. as keys, so having `#{ true: "Yes", false: "No" }` would be either ambiguous or confusing. So I'm not totally comfortable with curly braces or colon in the syntax at all. Suppose you have a key-value pair: KEY `{resourceType:"File", resourceCategory: "Audio"}` with VALUE `()=>"Audio file"` I would rather see something like ```javascript const map = # {resourceType:"File", resourceCategory: "Audio"} -> ()=>"Audio file" # ``` than trying to shoehorn the map syntax to share the existing object literal syntax. Personally I don't see the value in using maps at all yet until custom key equality can be trivially provided to a map.
naveen.chwl at gmail.com (2017-08-01T07:23:03.927Z)
If ES ever introduces a way of customizing key equality in Maps, then the literal syntax would have to be updated to include that "comparator" function. Also, curly braces with colons that separate the keys and values currently denote objects, whose keys are limited in type. Maps can have objects, booleans etc. as keys, so having `#{ true: "Yes", false: "No" }` would be either ambiguous or confusing. So I'm not totally comfortable with curly braces or colon in the syntax at all. Suppose you have a key-value pair: KEY `{resourceType:"File", resourceCategory: "Audio"}` with VALUE `()=>"Audio file"` I would rather see something like ``` const map = # {resourceType:"File", resourceCategory: "Audio"} -> ()=>"Audio file" # ``` than trying to shoehorn the map syntax to share the existing object literal syntax. Personally I don't see the value in using maps at all yet until custom key equality can be trivially provided to a map.
naveen.chwl at gmail.com (2017-07-31T05:48:00.174Z)
If ES ever introduces a way of customizing key equality in Maps, then the literal syntax would have to be updated to include that "comparator" function. Also, curly braces with colons that separate the keys and values currently denote objects, whose keys are limited in type. Maps can have objects, booleans etc. as keys, so having `#{ true: "Yes", false: "No" }` would be either ambiguous or confusing. So I'm not totally comfortable with curly braces or colon in the syntax at all. Suppose you have a key-value pair: KEY `{resourceType:"File", resourceCategory: "Audio"}` with VALUE `()=>"Audio file"` I would rather see something like ``` # {resourceType:"File", resourceCategory: "Audio"} -> ()=>"Audio file" # ``` than trying to shoehorn the map syntax to share the existing object literal syntax. Personally I don't see the value in using maps at all yet until custom key equality can be trivially provided to a map.