7 ms·
More broadly: > "No way to prevent $THIS" say users of only language where $THIS regularly happens A weird psychological quirk I've noticed (of myself, and ot
by nomilk 2y ago
More broadly:
> "No way to prevent $THIS" say users of only language where $THIS regularly happens
A weird psychological quirk I've noticed (of myself, and others) is we'll often exhibit a sort of 'programming language xenophobia', where we apathetically accept (or don't even notice) unpleasantries of our language of choice, yet be quite averse to the unpleasantries of other languages.
Maybe it's due to sunk cost; time/effort has already been spent finding work arounds for or adapting to the warts of our native tongue, whereas doing so for unfamiliar languages would require additional effort.
- BoxOfRain 2y agoThis is definitely a thing I recognise in myself, a year and a half of writing Scala daily has made me much more prejudiced against Java than I was before.
- bsza 2y agoI would rather have unpleasantries that make the language safer vs unpleasantries that make it more vulnerable. Especially when the unpleasantries in question don’t even make the language easier to use.
- quectophoton 2y agoC standard: "Undefined behavior means such a situation can't happen." Me: "If it can't happen then it would be fine to just crash on those situations, right? Because such a crash would never be reached. Can we get that?" C compilers: "No. Would you want to crash on signed integer overflow, for example?" Me: "Yes? Would be safer than the current situation at least." C compilers: "What, no, that would make your programs imperceptibly slower. Would you even like that?" Me: "Yes, I'll be able to live with that." C compilers: "Well, the answer is still no."
- nullc 2y agoIt would have taken you less time to look up -fwrapv / -ftrapv / -fsanitize=signed-integer-overflow + -fsanitize-undefined-trap-on-error than write out that misleading dialog. :)
- quectophoton 2y agoFair. Last time I checked ubsan was a few years ago for a small program, and I've read stuff about it not being suitable for anything outside development (more like a valgrind complement than a release option) because of how it messed with environment variables and linked libraries or something, so I might not have the full picture.
- GoblinSlayer 2y agoC is more likely to define wrapping arithmetic. Wrapping is defined as undefined for compatibility with MIPS processors that support checked arithmetic.
- deleted 2y ago[deleted]
- JimDabell 2y agoThere’s probably a large selection bias at work as well – people who care about those specific unpleasantries will avoid that language in the first place.
- deleted 2y ago[deleted]
- jstimpfle 2y agoNo way to prevent "this", says C++ programmer.
- from-nibly 2y agoJust use Python it uses 'self'
- jstimpfle 2y agoIn Python, you can easily just not type "self" (or whatever you named the 1st arg). In C++, you can not not type "this", at least if you don't, "this" will be looked up anyway.
- immibis 2y agosee also https://wiki.c2.com/?BlubParadox https://wiki.c2.com/?BlubParadox