6 ms·
I see that you too are a Python developer! /s
by neuland 8y ago
I see that you too are a Python developer! /s
- acdha 8y agoThere’s a serious point: cleaner code makes high-level optimizations easier and those are usually far bigger wins. I’ve seen more than a few times where Python, Perl, etc. beat hand-tuned C because the C used so many clever tricks that nobody wanted to change it.
- neuland 8y agoI absolutely agree! I use python like 70% of the time, and accessibility is one of the big reasons for that. Just making a joke.
- acdha 8y agoYeah, wasn't criticizing you. I think one of the signs of experience is when people go from just laughing at that to laughing and thinking more deeply it.
- kungito 8y agoHow is a language which doesn't have a type checker a synonym for clean code?
- acdha 8y agoPython's readability helps a lot — I've seen a ton of code in statically-typed languages where a bug was obscured by the syntactic boilerplate and nobody noticed that, say, they were calling the correctly type-checked function with the wrong variable, casting it incorrectly, etc. If the language or popular frameworks encourage boilerplate that's especially effective at getting people to skim over important details. Newer languages with solid type inference help a lot for reducing that cognitive load, so this isn't saying that one side of the static/dynamic-typing debate is wrong but rather that it's an important design factor for programmer productivity.
- viraptor 8y agoCheck out mypy. It works well.
- fulafel 8y agoPython does a lot of type checking and complains loudly, very different from eg Javascript.
- coldtea 8y agoBesides, whether it complains or not about misused types, says nothing about the code being clean or not. One can write totally unreadable code in Scala and a totally readable version of the same algorithm in Python if one so wishes.
- coldtea 8y agoHow is a type checker or the presence of types synonymous with clean code? The two are totally orthogonal concerns. You can write highly obfuscated spaghetti code from hell in any type checked language you wish...