Live data from Hacker News

Python's “disappointing” superpowers

lukeplant.me.uk

131–140 of 264 posts

Re: Python's “disappointing” superpowers

#131

Earlier 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]

[deleted]

Re: Python's “disappointing” superpowers

#132

Earlier quoted context omitted.

[flagged]

I support you ReflectedImage - seems like these people just don't know how great dynamic languages can be! My team has actually seen a 30x decrease in bugs, and a 50x increase in productivity ever since switching to Python.

Well a lot of people are claiming that static typing reduces bugs compared to dynamic typing, but I haven't seen from them a shred of evidence of this.

When I go looking for myself what I found was studies saying that dynamic typing reduces development time by 2.5x and bugs per software feature by 2.5x.

So perhaps one of these people claiming that static typing reduces bugs over dynamic typing, could provide the slightest bit of evidence to backup their claims?

Is that too much to ask @spoils19?

But I'm pretty sure they will just find the exact same figures as me.

Re: Python's “disappointing” superpowers

#133

Either embrace dynamic typing and provide good error guards...or try to use type hints and still make good error guards. We had an entire history of Python 2 without type hints. Why use them now?

We had an entire history of stupid errors (like field name typos), excessive test coverage (and associated maintenance burden) to catch those stupid errors, and everything breaking every time you upgraded a big framework (like Django) even with all of those tests in place.

Re: Python's “disappointing” superpowers

#135

Earlier quoted context omitted.

What part specifically? Java is (in)famous for its orms after all. Unless you want to count that as clunky codegen? I'd argue that all metaprogramming boils down to that though.

Unless you want to count Java as clunky? Well, I definitely think Java is clunky. This article by Steve Yegge, titled "Execution in the Kingdom of Nouns" sums up Java for me: https://www.eecis.udel.edu/~decker/courses/280f07/paper/King...

... this PDF is from 2006, the same year that Java 6 was released. Java 7 and Java 8 were game-changers at their time.

I doubt there is much relevance left, especially in light of Java's excellent functional integration into its type system and JVM.

Edit: ``` There's no reason Java couldn't simply add first-class functions and finally enter the grown-up, non-skewed world that allows people to use verbs as part of their thought processes ```

Ironically, this is exactly what happened. With exception that proper technological implementation took many years and might have one of the best implementations for anonymous functions out of any programming language (thank you, dynamic JVM).

Re: Python's “disappointing” superpowers

#136

Earlier quoted context omitted.

[flagged]

Citation heavily, heavily needed. Dynamic typing means that none of your code can be statically checked, which means that correctness relies on the exhaustiveness on your tests. It should be obvious that this would allow you to introduce more bugs, not fewer. 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…

[flagged]

Re: Python's “disappointing” superpowers

#137
I'm a so called "scientific" programmer, not a software developer. My work is upstream from turning anything I make into a product by the real devs, who have their own languages.

Maybe I'm in a minority, but I use dynamic typing. I can haul data around in flexible formats such as JSON, asdf, pickle, and so forth, and manipulate them as dict structures. Python builds the structure automatically.

One of my first languages was Pascal, and so I understand the principle of letting your data structures and type checking do your work, and I still live that way when programming in C for embedded stuff. There may be better ways of doing what I'm doing, but there are also worse ways. From my own experience with getting software changed to suit my own development work, data structures and file formats are right up there in terms of why software is so inflexible.

Re: Python's “disappointing” superpowers

#138
post #110

Earlier 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]

Static typing is not just about code performance, it’s absolutely about correctness as well. I would really love to see that study as it flys in the face of all my experience

Re: Python's “disappointing” superpowers

#139

Earlier quoted context omitted.

Citation heavily, heavily needed. Dynamic typing means that none of your code can be statically checked, which means that correctness relies on the exhaustiveness on your tests. It should be obvious that this would allow you to introduce more bugs, not fewer. 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…

[flagged]

[deleted]

Re: Python's “disappointing” superpowers

#140
post #110

Earlier 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]

Not that I am a huge static or dynamic typing fan, but I think language with very strict type system disagree. Like for example Haskell or Rust, where when it compiles, it usually works, unless you introduced a logic mistake. Python with its typing might potentially never get there, but that is not the point.
Post reply on HN