erights / quasiParserGenerator

A template string tag for generating template string tags.
Apache License 2.0
65 stars 9 forks source link

Microses: include ?: instead of if-then-else ? #7

Closed erights closed 7 years ago

erights commented 7 years ago

When @metaweta first suggested it, I missed that ?: does not subsume if-then-else since JavaScript is not an expression language. (Weird blind spot!) When the then-clause or else-clause needs to contain statements, then it cannot simply be included in the branches of a ?: since they must be expressions.

Having both is too non-minimal. Resolution: Omit ?: