4 ms·
How could it not be? It has a name that says what it's doing, while yours is more punctuation than text. To "read" yours I have to just skim over it and mentall
by Noumenon72 6y ago
How could it not be? It has a name that says what it's doing, while yours is more punctuation than text. To "read" yours I have to just skim over it and mentally assign "according to the variable name, that hodgepodge means 'distance'... I hope".
I have a BS in math, so obviously I'm familiar with the math notation, but I code like an English major.
- klyrs 6y agoIf the function was named "hypotenuse" then it would be unambiguously more readable. But since the function is considerably older than the modern zealotry surrounding code readability, it's this weird 5-letter word that most people aren't familiar with. Contrast that to the Pythagorean theorem, which folks are exposed to in elementary/middle school.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- seoaeu 6y agoYeah, not to mention tons of possible variations of that line that you might not notice at a glace but would completely change the output.
- klyrs 6y agoYeah, my bad for not radiation-hardening my code https://github.com/mame/radiation-hardened-quine https://github.com/mame/radiation-hardened-quine
- seoaeu 6y agoI was thinking more in line with http://www.underhanded-c.org http://www.underhanded-c.org, but that was also an interesting read