All these features are nice and stuff... But they are often runtime features... At compile time Python doesnt tell you wether a program is correct. Which is fine for small programs or small services. But any big system is written in python is really hard to maintain without LOTS of unit tests... Static typing, compile time checks just win in the long run. And with languages like kotlin you still have all the advantag…
No programming language tells you if a program is correct at compile time. Type errors aren't a very common type of bug either.
Python's “disappointing” superpowers
121–130 of 264 posts
Re: Python's “disappointing” superpowers
#122Earlier quoted context omitted.
OP is not saying that type checking is useful. They’re saying that it’s not as useful.
What about Python's data model makes typechecking less useful? You still need to know how data flows through your application. You can either document it in your types, or require your engineers to hold all that information in their heads/recapitulate it every time they want to refactor code. That has nothing to do with the language's data model.
Re: Python's “disappointing” superpowers
#123Earlier quoted context omitted.
[flagged]
> It's not a very strong claim, it's due to dynamic typing enabling the writing of more concise programs. The number #1 bug elimination tool is to simply write less code. It is a strong claim, it's also a very precise claim. Where do your numbers come from? Haskell and the ML family of languages also permit you to write much more concise programs than many other languages and they're definitely statically typed. How…
Re: Python's “disappointing” superpowers
#124While this might be about my most unpopular opinion, it feels like it is time to start putting together a Python 4.0. I don't particularly have skin in the game but there is(?) enough meat on the bone around things like improving the GIL status quo, JIT compiling, static typing, and presumably etc. to be worth a breaking change.
Re: Python's “disappointing” superpowers
#125Earlier quoted context omitted.
> It's not a very strong claim, it's due to dynamic typing enabling the writing of more concise programs. The number #1 bug elimination tool is to simply write less code. It is a strong claim, it's also a very precise claim. Where do your numbers come from? Haskell and the ML family of languages also permit you to write much more concise programs than many other languages and they're definitely statically typed. How…
[flagged]
Re: Python's “disappointing” superpowers
#126> I’m worried that a de-facto move away from dynamic stuff in the Python ecosystem, possibly motivated by those who use Python only because they have to, and just want to make it more like the C# or Java they are comfortable with, could leave us with the very worst of all worlds. It is certainly happening, and I'm not sure Python the language is all the better for it. I say that as a guy who explicitly mentioned this…
My theory is that Python and C++ are slowly evolving towards eachother, and in 20 years will merge into the same (very confusing) language.
And everything taking from lisp/other functional languages: lambda, map, filter etc. Which I really like
Re: Python's “disappointing” superpowers
#127Earlier quoted context omitted.
We had dedicated QA testing. QA testing failed to create the requisite conditions. Type checking is not a replacement for QA testing. However, it is much cheaper and also finds bugs that might be incredibly hard to find through random chance or through structured smoke testing, because it does not depend on how common a given code path is. QA testing is even less likely to find issues than automated test suites, sinc…
[flagged]
Re: Python's “disappointing” superpowers
#128Re: Python's “disappointing” superpowers
#129Re: Python's “disappointing” superpowers
#130Earlier quoted context omitted.
What about Python's data model makes typechecking less useful? You still need to know how data flows through your application. You can either document it in your types, or require your engineers to hold all that information in their heads/recapitulate it every time they want to refactor code. That has nothing to do with the language's data model.
[flagged]
Every program involves passing around data. When you need to change that data in a dynamic untyped language, you have no option but to manually test your whole system to make sure that you nailed all the spots.
Compare that to a language like TypeScript. If I need to refactor my code, I update the type and the static typechecker immediately tells me all the spots I need to fix. I don't have to hunt for them, I don't have to run it 100x trying to hit every edge case. And JavaScript is still dynamic, it doesn't stop me from writing concise code.
This isn't theoretical. I literally just worked on changing something from a dict to an object in Python, and it was a pain. Thankfully most spots were documented with type hints, but even then I ran into many runtime errors that could have been caught statically.