3 ms·
I'm very happily maintaining a 15 kLoC code base (my file manager [1]). No issues at all. Though it must be said I'm alone, so know the code base inside out. M
by mherrmann 8y ago
I'm very happily maintaining a 15 kLoC code base (my file manager [1]). No issues at all. Though it must be said I'm alone, so know the code base inside out.
My point: Likely, there is a project size where Python's dynamic nature becomes a challenge. But 10 kLoC isn't it.
[1]: https://fman.io https://fman.io
- qalmakka 8y agoWriting code ≠ maintaining code someone else has written. Duck typed code relies in general in implicit behavioural assumption on how the values you're receiving should behave, and it's much better to be the one making choices than the once trying to understand them. I'm not arguing that it's not possible to do it; I just think that it requires a bit of extra steps and care to document which assumptions your code takes and how it behaves that could be more meaningfully described by a statically typed language. But these are just my 2 cents.
- austinpray 8y agoWhat do you think of mypy? http://mypy-lang.org/ http://mypy-lang.org/
- qalmakka 8y agoIt seems definitely promising; it depends on how much adoption it's going to take. Even the most interesting languages (like Nim, for instance) struggle these days without corporate backing.
- drcongo 8y agoWorth pointing out maybe that MyPy is not a language but a type checker that works with regular Python. I've been getting into the habit of using it on everything I do lately and find it extremely useful. You can even do runtime checking on the types with tools like Enforce [1], and the Molten framework that was posted on here last week [2] uses MyPy typing as a core part of the framework. [1] https://github.com/RussBaz/enforce https://github.com/RussBaz/enforce [2] https://news.ycombinator.com/item?id=18107818 https://news.ycombinator.com/item?id=18107818
- scarface74 8y agoOf course it’s possible if you write every line of code and you know it inside an out, but that’s very much not the norm.