3 ms·
> capacity to change Good luck making changes to a 100kloc Python codebase.
by adamnemecek 8y ago
> capacity to change
Good luck making changes to a 100kloc Python codebase.
- gmueckl 8y agoYou could perhaps start by adding type annotation. They are not perfect, but they help.
- adamnemecek 8y agoToo little too late.
- ignaloidas 8y agoIf you have good manners, Python codebases can easily grow over 100kloc mark. Static type annotations, using descriptive variable and class names, type checks on user input(esp. libraries) makes growth safe and simple.
- arcticbull 8y agoThat’s a good observation, thing is, Rust just makes the manners mandatory.
- Spiritus 8y agoNo problem. I do it every day.
- adamnemecek 8y agoAlright, now dive into a new codebase and report back.
- pizza234 8y agoI do something similar daily, and it works fine, as we have a strong test suite. You can't disassociate dynamically typed languages from (strong) test suites, so one needs to qualify: > Good luck making changes to a 100kloc Python codebase without test suite versus > Good luck making changes to a 100kloc Python codebase with a good test suite In context, the first case is no different from "Good lucking making changes to a 100kloc Rust spaghetti-coded codebase", and one can't meaningfully judge a something based on a poor use of it.
- adamnemecek 8y ago> In context, the first case is no different from "Good lucking making changes to a 100kloc Rust spaghetti-coded codebase", and one can't meaningfully judge a something based on a poor use of it. It's not the same. Type system provides certain guarantees. Also it's much harder to write spaghetti code in Rust.
- baq 8y agodid that on 50k code base with the help of runtime automatic type annotators (e.g.https://github.com/Instagram/MonkeyType https://github.com/Instagram/MonkeyType) it's absolutely doable, it took a few days total.