dinomug to General Programming Discussion · 4 years ago7 really good reasons not to use TypeScript | everyday.codeseveryday.codesexternal-linkmessage-square9fedilinkarrow-up115arrow-down12
arrow-up113arrow-down1external-link7 really good reasons not to use TypeScript | everyday.codeseveryday.codesdinomug to General Programming Discussion · 4 years agomessage-square9fedilink
minus-squareshilangyu (lemmur)linkfedilinkarrow-up13·edit-24 years agoI’m so bored of people bringing up NaN !== NaN when talking about “javascript’s wonkiness”. This is defined by IEEE for the floating point standard and it appears in any other language using IEEE 754 (which is the majority)
minus-squarehandvatlinkfedilinkarrow-up5·4 years agoYou shouldn’t attempt comparing 2 floating point numbers with simply == (or === in JavaScript) in most cases and in most languages anyways.
minus-squarespytfyrelinkfedilinkarrow-up1·4 years agoTotally agree. Moreover I can not think of a valid scenario where you would use such a comparison
I’m so bored of people bringing up NaN !== NaN when talking about “javascript’s wonkiness”. This is defined by IEEE for the floating point standard and it appears in any other language using IEEE 754 (which is the majority)
You shouldn’t attempt comparing 2 floating point numbers with simply
==
(or===
in JavaScript) in most cases and in most languages anyways.Totally agree. Moreover I can not think of a valid scenario where you would use such a comparison