2 ms·
"Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should." - Jurassic Park. Also, what I think about every
by darksaints 5y ago
"Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should."
- Jurassic Park. Also, what I think about every time I learn about a "feature" of javascript (like all of the examples in this post) that allows you to do things that would cause any other compiler developer to laugh you out of the room.
- Vanit 5y agoMy gut reaction was similar, I wish this instead linked to an article explaining some usecases. I'm assuming if you're writing Babel plugins maybe you want to turn some of these features off so you can make it do alternative behaviour?
- fiddlerwoaroof 5y agoBabel 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.