How does Python's lack of static typing affect maintainability and extensibility in larger projects?

Viewed 3841

After reading this very informative (albeit somewhat argumentative) question I would like to know your experience with programming large projects with Python. Do things become un manageable as the project becomes larger? This concern is one thing that keeps me attached to Java. I would therefore be particularly interested in informed comparisons of maintainability and extensibility of Java and Python for large projects.

8 Answers

I am working in a big data start-up company which use python as main language. My projects is about 30k lines of python. from my experience, if your team adopts a good programming practice, fox example, adding type hints and extensively unit testing, it maybe not so affect maintainability. since Pycharm can automatically detect type some type errors if there are type hints.

the real issues are: 1. performance, this may not related to maintainability, but it is an issue. 2. not every python code base you handled are well written. since python is easy to learn and code. some people who do not have some basic CS training would develop a python project which is impossible to maintain. i worked a python project which has a lot files that has several thousand lines each without type hints. and that guy do not know about OOP. he basically write python in a way like writing C. he just utilize some python language features but completely imperative programming. Good written python projects really rely on well trained engineers. if you can not hire good-enough engineer, it would better to rely on tools itself. 3. in a python big data company, product managers and some non-technical people do not care data type in consistence. those people would design a data product which are not type-safe. for example, in a Json if a field which is usually a str, but when it is empty, some people would make it null. this would fail at Runtime.

Related