To read all comments associated with this story, please click here.
This is for *beginners*, so the objective is to get them thinking like programmers. The fact that Python's slower than a compiled language is irrelevant for this use.
I wonder how much programming you've done, since once you've got an understanding of algorithms, it takes comparatively little time to adjust to a new programming language.
Let's face it: it's more convenient to program in a language like Python than it is to program in Pascal. When people know a more convenient language, do you honestly expect them to learn a less convenient one? I surely don't, it would be evil.
So let's just pick the best of the compiled languages in the first place.
since once you've got an understanding of algorithms, it takes comparatively little time to adjust to a new programming language.
I know, learning a new procedural or OO language once you know another is really easy. But read what I said above: Will people learn less convenient languages when they know one that is easier to use? Not really.
I wonder how much programming you've done,I know Basic, Pascal, x86 assembly, PHP/HTML/CSS/JavaScript, and basic C, C# and Java. I've written my own basic compiler (no interpreter bottlenecks).
Python could be three times as slow and still be a good language for beginners. The point is to teach programming as a way of thinking about problems, and not just "coding".
If the language is good in helping newbies "get" programming, then they'll be able to tell a particular language is adequate for the job or not, and they'll also be able to learn a new language quickly if needed.
And, btw, Python isn't slow.
Yes, it's slower than a bunch of languages out there, like C and Java and stuff, but that's exactly why there are all those languages out there. Python fits most needs, but when you need performance, you look elsewhere. At least, you look elsewhere for a language that allows you to make modules callable from Python
.





Member since:
2006-06-24
One thing is how to best teach programming, but I think the answer depends not on how easy it is to teach programming with a given language, but what we want students to learn.
I don't doubt that Python is an elegant, readable language from a human point of view, but it's very slow. Do we want to create hordes of programmers who create programs that, although they use the most efficient algorithms, are around 20 times slower than they have to be? I don't think so.
Now you probably think that I want to burden new programmers with strange symbols and programs that could just as well be written in cyrillic, along with the dangers of pointers and all that stuff. But no, teaching beginners C isn't a good idea.
So why not Pascal? It creates fast programs, compilation is fast (so you can test/run/test/run like an interpreted language), it doesn't look scary and it's strictly structured. What more can you ask for? (Yes, I know you just LOVE to write in a cool programming language that's unreadable, but is it really a good idea?)