Strict (non-coercing) expressions
bjouhier at gmail.com
Sat Apr 15 11:01:16 UTC 2017
I don't know the ins and outs of the "nobody likes", I'll just respond as a
We do not expect `NaN` in 99.99% of our code, and we do not expect
infinities in 99.95% of it. Instead of having these values creep unnoticed
though the computations (and else branches executed because tests are
silently false) it would be better to have them turned into exceptions
With a pragma I would just set the fail fast default at the top of every
module and override it in the few functions where special values are
expected. Impact will be low and code will remain _familiar_.
With a new set of operators, I'll have to replace the operators (almost)
everywhere in the code. I'll also have to create a new lint rule to enforce
the new operators everywhere, and I'll need to introduce a lint directive
for the exceptions. Big impact and code will look _strange_.
Obviously I prefer the pragma solution but I don't really care about the
pragma syntax. If "use ..." does not cut it there are other ways
(contextual `pragma` keyword?).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss