Hacker News new | ask | show | jobs
by pthread_t 1554 days ago
> I don't want to teach OO concepts

Does python really force this? I can see this being the with java -- a language often used in intro to CS courses.

2 comments

Python the language itself, perhaps not. The standard library, on the other hand, is a random hodgepodge of imperative, OOP, and functional styles, and the greater library ecosystem is no different.
It doesn't. Python is actually a pretty good language for teaching algorithms, you never need to type "defclass" unless you want to. You do, kind of, have to use methods, but that's not a huge burden for a learner compared to the other things they have to learn. Also, if you're using a language-agnostic algorithms textbook (in a course, solo, or as a mentor) then Python is very close to the pseudocode in most of those.
Python's closeness to pseudocode is one reason why it makes a fantastic choice for whiteboard coding interviews.

I've personally had interviewers frustrated that I solve problems correctly so much faster than they expected. And not only correctly, but to the point where I could type what I wrote verbatim into the interpreter and prove that it actually works.

Python is pretty much zoomer BASIC. I think it's a pretty good choice for those early painful bits of learning how to program, when you have to understand that a program is sequenced instructions to a computer, that the effect of an instruction depends on what happened before, etc. You can write a complete Python program without defining a class or invoking an object. These concepts can be introduced after the learner has the basics down pat.