4 ms·
Autocasting. Autocasting was a cool and newbie friendly idea in principle. It just turned out to cause such horrible bugs in real code that no sane person would
by adimitrov 7y ago
Autocasting. Autocasting was a cool and newbie friendly idea in principle. It just turned out to cause such horrible bugs in real code that no sane person would still argue its merits.
It also leads to stupid notions of thruthiness (google Gary Bernhard's WAT talk) and bad junior dev behavior. I've seen a popularish PHP framework document the return value of a function al boolean, but the actual return value was the string "0". It wasn't even a by prduct of the implementation. They just explicitly used return "0" for no good reason.