Re:JavaScript: The Curious Case of null >= 0
by Tarean on Saturday September 09, 2017 @01:50PM
(#15208205)
To be fair,
or
aren't that much harder to read. The second one probably doesn't do deforestation and would end up stupidly slow, though.
[ Parent
| on HN ]
Re:JavaScript: The Curious Case of null >= 0
by xamuel on Sunday September 10, 2017 @12:24AM
(#15210604)
For the first one, would engines like v8 be smart enough to optimize it so it isn't wasting time on a pointless if-branch? (I'd imagine not, as it would be pretty hard for the engine to know that all the record.bool's are booleans.)