2 ms·
What you put as an example isn't a footgun if you know how the language evaluation rules work. Once you understand that the "footgun" explains a dozen behaviors
by Daishiman 1mo ago
What you put as an example isn't a footgun if you know how the language evaluation rules work. Once you understand that the "footgun" explains a dozen behaviors, which may be a weird behavior but it is consistent.
- Izkata 1mo agoWhich isn't really much of a refutation because you can say the exact same thing about what's on wtfjs.
- DangitBobby 1mo agoThere's really no comparison. I use both languages extensively and JavaScript is by far the quirkier language.
- Daishiman 1mo agoNo, the JS WTFs have to do with language quirks that result in conditionally different behaviors. The Python WTFs have to do with underlying mechanisms that are not conditionally different, but the condition may not be "obvious". This is so much so that it is described in the Zen of Python: There's preferably One Way to do things, but that one way may not be obvious.
- ModernMech 1mo agoA property of footguns is they make sense and are coherent to people who do understand them. To them they are just useful tools (i.e. guns). A gun becomes a footgun when you put it in the hands of someone who doesn’t understand how it works and they promptly blow off their foot.
- Daishiman 1mo agoTrue in theory, in practice the quirks of Python can be understood in two days. As a user of both Javascript and Python for 20 years the Javascript quirks have no internal consistent logic that can be easily absorbed.