3 ms·
And me around 20 years - also never even heard of the `with` statement! I think to qualify as a footgun, people actually need to be using it in the real world.
by GordonS 6y ago
And me around 20 years - also never even heard of the `with` statement! I think to qualify as a footgun, people actually need to be using it in the real world.
- javbit 6y agoIt should be called something like appendixgun then because you don't use it but it still has a chance of causing needless suffering and pain.
- astrange 6y agoThe appendix is a reservoir of gut bacteria in case you lose yours in an infection or by taking too many antibiotics.
- IgorPartola 6y agoI have seen it in the wild. I first learned of it from Douglas Crockford’s JavaScript the good parts. He also had some things to say about the new keyword and prototype inheritance and how we should stop using them. Ironically while he was dismissed on that suggestion then, VueJS has pretty much implemented exactly what he has in mind in their V3.
- azernik 6y agoThere are lots of more conventional footguns in JS, though - everything about the Date object/class, for example.