3 ms·
Babel usually only processes code you write so, assuming that the developer isn’t relying on document.all being falsy or similar makes sense: !document.all ===
by fiddlerwoaroof 5y ago
Babel usually only processes code you write so, assuming that the developer isn’t relying on document.all being falsy or similar makes sense: !document.all === true is surprising and the sort of thing that should be banned with lint rules.
Also, a lot of compilers have ways to enable normally unsafe transformations: in sbcl, for example, if you (declare (safety 0)), the compiler will just automatically trust your type declarations and generate machine code that is unsafe if this assumption isn’t true: it’s useful because sometimes “correct” behavior has an unacceptable performance cost.