r/ProgrammerHumor 17h ago

Meme iHateThisPassiveAgressiveBehaviourRuby

Post image
2.3k Upvotes

262 comments sorted by

View all comments

32

u/TKristof 16h ago

Implicit type coercion is just bad in general and shouldn't be allowed, that includes booleans. 0 and false are not the same thing even if in memory they (usually) are represented the same. Just because 40 years ago we thought it a good idea doesn't mean we shouldn't improve on that. And I say this as someone who has programmed quite a bit in C and C++.

I could maybe see an argument for optionals but even there I would disagree and much prefer explicit pattern matching or zig style if syntax for it.

2

u/Spaceshipable 6h ago

I like Swift’s approach to this, even if it does end up slightly more verbose sometimes.