DEV Community

Discussion on: Why all this hate about Python?

jasongabler profile image
Jason Gabler

I hear what you're saying about the dynamic (or, weak) typing. But I've always believed that weakly typed languages are a bad choice for beginners -- for exactly the reasons you've been learning to appreciate stronger typing. Weak typing might lead to more instantly gratifying accomplishments in the beginning, but as the beginner's software grows into something more complex, already established bad type-ing habits lead to some of the more difficult to debug errors rooted in the subtleties of weak typing. As you've pointed out, strong typing removes that ambiguity, leading to clearer code. It might be more verbose at times, and also less tricky and impressive. But when it comes to the actual computing that happens down under, there's really no difference. And when someone else takes on the maintenance of that code, the one thing their going to want is straightforward, obvious code. Cool, trick, obfuscated solutions waste time and money.

Like I've been saying in this thread, Python is good for what it's good for. As for pedagogy, especially for those who wish to be industrial software developers, I don't think Python is it. I believe schools who start out with Python do so because it's the in thing right now.

kenseehart profile image

Python is good for what it's good for. For the rest, I code an extension in the appropriate language for the task and call it from python :)

lochsh profile image
Hannah McLaughlin

I think it's really interesting to think about what is a good programming language for people to start with. It's something I have conflicted feelings about.

I think you might be right that Python is not a good first-language choice for people who want to be professional software developers. But I also think that software should be open to more people than that.

I think it's difficult to balance the advantages of learning things "right" the first time, and the concern that people might not learn anything at all if the content feels inaccessible. I worry about people picking up bad habits/not ever learning what is going on under the hood of their Python program, but I worry even more about people giving up on learning to program altogether.

Perhaps the answer is better teaching approaches & materials for languages that are considered more difficult to learn. Perhaps our entire approach for teaching programming needs updated so that the chosen language is less of a big deal. I don't know.

I think you may be right that some schools start out with Python because it's trendy, but perhaps there's a reason for that trendiness. It's definitely more accessible than, say, Haskell.

ronbarakbackal profile image

Hi Jason! I think I agree with you that Python is not a good language to start with. But what is your suggestion for a starting language?
Actually I've seen that Oxford starts with Haskell, which I think is pretty unique. I can tell you I mostly see either Python or Java for starting choice! Usually after covering Python and Java there is gonna be some short C/C++ just to ensure everyone is on the same page.
I tried experimenting with Julia(incredibly easy to math your way to a result), Go and Rust and there was something satisfying about those(I'll say how easy it's gonna be Julia-->Go-->Rust or Julia-->Rust-->Go)