4 ms·
Seems like a lot of options were/are debated: https://github.com/tc39/proposal-record-tuple/issues/10 https://github.com/tc39/proposal-record-tuple/issues/10 T
by WorldMaker 6y ago
Seems like a lot of options were/are debated: https://github.com/tc39/proposal-record-tuple/issues/10 https://github.com/tc39/proposal-record-tuple/issues/10
The benefit to #{}/#[] is that # is not an existing identifier character (other than private fields) in JS, and also isn't an existing binary operator. Proposals to TC39 are constrained that they must as much as possible not "break" existing JS parsing of existing code. That removes a lot of possible characters because they already have valid parses. It also makes it tough to introduce new keywords beyond those ES3/ES5 set in stone as reserved, because they might be identifier names in user applications.