2 ms·
IMO, a python script should not reach 1500 lines, unit tests would be much better. I don't like typing mainly because any code with it looks ugly XD, and if I
by powerapple 6y ago
IMO, a python script should not reach 1500 lines, unit tests would be much better.
I don't like typing mainly because any code with it looks ugly XD, and if I really care about typing, I would use a different language.
Now we are pushing all languages to be able the same. Instead of having a few languages excel in different domain, we want to use one language to do everything. Each of them will come with their own eco-system, and we use library for every little simple things, then we have hundreds of dependency resolution solutions, I personally don't find it appealing.
There are programming languages better than Python on something, maybe don't use Python for something it is not good at.
to be clear, I am not against having static typing as option
- rualca 6y ago> IMO, a python script should not reach 1500 lines, unit tests would be much better. My take was that Python's lack of static type checking led to the script being an unmaintainable mess because it was risky to refactor and gradually made impossible to audit, to the point where around 30% of its code was dead code that no one was able to spot. Adding type checks was the key to fix that. This anecdote feels like the norm in Python projects that fail to use static type checks. Without type hints, you are forced to manually check all code paths that directly and indirectly touch the component you need to change in order to reason if a minor change has catastrophic consequences. With static type checks, instead you only need to look at the type declaration or function signature to determine what you and cannot do. I don't understand how some Pythonista still try to pass this off as a feature instead of a fundamental problem.