4 ms·
> With Python it's much easier to become proficient and remember everything you need to know. That translates to more time being productive writing code instead
by xedrac 4y ago
> With Python it's much easier to become proficient and remember everything you need to know. That translates to more time being productive writing code instead of reading documentation
Until your python program reaches a certain size where the lack of type safety and other protections becomes a real liability. Contrast that to something like Rust, where it's easy to have confidence in very large code bases.
- falcolas 4y agoAs someone who's worked on a huge Python program (10M+ LOC), type safety was the last thing on our mind when maintaining it. Refactoring might not have been quite as simple, but there are plenty of tools available for refactoring Python code, and we were never afraid of doing it. Though, working on a project right now in Java, the type system isn't exactly saving us from refactoring failures, because the type system doesn't ensure that the String or Integer or <low level interface> being passed in is the right one. Of course, I'm sure we're just "doing it wrong".
- yakshaving_jgt 4y agoThere’s a significant delta between Java types and Haskell types.
- falcolas 4y agoHow do you know someone's a Haskell programmer? They insert themselves into every discussion about typing to point out how bad all programming languages that aren't Haskell are at types.
- yakshaving_jgt 4y agoI could just as well have said OCaml. Or Idris. Or PureScript. Or Elm. The point isn't Haskell. The point is not Java.
- rowanG077 4y agoYou picked one of the best dynamic languages and compare to literally the bottom barrel of the statically typed language. And then you complain when someone points this out. This seems to me like you are acting in bad faith.
- epgui 4y agoI don't think the accusation of bad faith is necessary. Don't you think it's more likely the commenter was just missing the point?
- cosmic_quanta 4y ago> As someone who's worked on a huge Python program (10M+ LOC) Holy moly. I can't imagine working on a codebase like this in Python. I maintain several small codebases (<10k LOC) at work. Even at this size, I definitely feel the lack of type safety -- specifically, at the boundaries of logical blocks of code. When refactoring, the lack of thorough type-checking means that I need to mentally propagate my changes throughout the codebase. This is exhausting!
- harveywi 4y ago> As someone who's worked on a huge Python program (10M+ LOC), type safety was the last thing on our mind when maintaining it. This is true. Python dictionaries are extremely powerful, and they obviate the need to use elaborate types throughout the code. There is even a special syntax for making dictionaries in Python. In a code base with lots of dictionaries, type errors are a thing of the past.
- klyrs 4y agoEverything-a-dict results in KeyError instead of type errors. But of course, the values have a type unless it's dicts all the way down. And I really wonder what you'd be using those 10M LOC for, with that approach...
- bslatkin 4y agoI've had a similar experience in a large Python codebase!
- perrygeo 4y agoSo, what was the first thing on your mind when maintaining it? Python gives you plenty else to worry about besides types.
- deleted 4y ago[deleted]