endojs / Jessie

Tiny subset of JavaScript for ocap-safe universal mobile code
Apache License 2.0
281 stars 16 forks source link

bang (!) operator conflicts with TypeScript's non-null assertion operator #33

Closed bhgsbatista closed 5 years ago

bhgsbatista commented 5 years ago

The non-null assertion TypeScript operator conflicts with the infix bang operator as demonstrated in the README.

This will complicate approval of the bang operator by the standards committee.

I suggest considering alternatives, such as the thin arrow -> or dash followed by a dot -. to avoid incompatibility with TypeScript.

The optional-chaining proposal introduces the concept of a symbol followed by a dot (?. in that case), so a symbol followed by a dot approach is likely a safe bet.

erights commented 5 years ago

Indeed. We are considering ~.

erights commented 5 years ago

See https://github.com/Agoric/cosmic-swingset/issues/60#issuecomment-522706667

bhgsbatista commented 5 years ago

Thanks for the update. I'm closing it since it's already being tracked.