Live data from Hacker News

Python should not be taught as a foundational language

thedropout.dev

21–30 of 82 posts

Re: Python should not be taught as a foundational language

#21
Nothing in this article is foundational, just stuff the author doesn't like or understand (such as the differences between arrays and lists) and it all happened to be superficial as hell. There are valid reasons to not teach python as a foundational language (and valid reasons for it as a good intro language), but none of them are in this article. As another commenter put it, it reads more like "why isn't Python C?" and still somehow misses the important teaching aspects of the C family of languages.

Re: Python should not be taught as a foundational language

#22

Absence of clear types is what driven me mad (and my ex), when my ex tried to learn python via interactive online courses. Constant questions like: "why this thing named a is a number and this one thing named "b" is now a list and this other thing does stuff". Switched to java, all problems immediately disappeared.

apologies but that sounds like a poor course you guys picked. types should not be a concern for a beginner. i started programming with BASIC and even though it had rudimentary types it wasn't until later that i really learned about types.

worrying about types means you already knew about them.

Re: Python should not be taught as a foundational language

#23
To my mind, it boils down to whether you think static types and memory management are foundational skills that a programmer is well served to learn early and build upon, or merely cognitive overhead that distract from what the programmer is trying to do. If the former, then obviously a language that ignores those is detrimental to long term development. If the latter, then clearly you want something like Python as your introductory language. I think either stance is defensible.

Actually, I wonder if the right conclusion isn't one side or the other, but that separate tracks for systems programming vs web dev (or whatever dichotomy you prefer) should be introduced earlier on in education, maybe separate specializations within a CS degree.

Re: Python should not be taught as a foundational language

#24
post #10

Somewhat reasonable title but poorly written content. > For instance, what is called an "Array" in pretty much every mainstream language, is instead called a "List" in Python. Because it is a list rather than an array (as in C). > Another issue with Python is that it is essentially two different languages, there's Python 2.7 and Python 3+. It's 2020, you are not supposed to teach Python 2 to newbies. I was expecting…

What do you mean by that it is a "list"? It's certainly not a linked list.

Re: Python should not be taught as a foundational language

#25
While I share plenty of the annoyances this author has with Python, and I’m sympathetic to the argument, they never quite manage to spell out why Python’s choices are somehow worse than any other language other than that Python does things differently.

Why is having constant variables so important when learning? Why are curly braces important? The author never says.

Meanwhile, while I agree Python’s strings are overcomplex and often frustrating, the weird digression about how “most languages” have char and char[] and String is a fancy wrapper, is actually just incorrect at this point and reveals just how narrow the author’s experience actually is.

In the meantime, my kid learned to program using Python and then went on to do very well picking up Java In subsequent classes. In my opinion, she’s far better off for being exposed to two very different languages early on rather than coming up thinking everything needs to look like C to be a “real” language.

Re: Python should not be taught as a foundational language

#26
Python works for a large swath of issues, and is much easier to learn. That's the point of it. With Python, you can more easily move from a purely syntactical focus to actually programming.

If you need to go into lower level programming languages in the future, that's cool. You can go deeper into stuff like variable types, constant variables, block scope, garbage collection.. whatever you want. You already have a grasp what a string is, how to use a for loop, etc.

In reading the article, it seems like the author is saying essentially "Programming is supposed to be hard. Python makes it easier. So don't teach Python." But shouldn't we be teaching people the easy stuff first? That way they can get, y'know, programming?

The version split is about the only reasonable argument. And how you teach that is the following: Python 2 and Python 3 are different languages for all intents and purposes. Use Python 3.

But what do I know; I'm just a self-taught coder.

Re: Python should not be taught as a foundational language

#27
The author seems to make a circular argument: foundational languages look like C++/Java, Python doesn't look like C++/Java, ergo Python is not a foundational language.

There are no foundational languages, what is foundational is CS theory itself. C++ and Java are just part of the ALGOL tradition, which syntactically relies on a bunch of arbitrary choices (curly braces vs indentation is an arbitrary symbolic choice and any preference is personal and subjective), and furthermore were highly influenced by 70s computer architecture that doesn't really exist anymore. In other words: just a bunch of legacy choices.

Python is the best general-purpose language there is at the moment, because of its popularity, ubiquity, actual use in a wide diversity of domains and availability of libraries for almost anything you can think of. Furthermore, the syntax is simple enough for one to be able to keep it all in one's head and not having to constantly refer to documentation. If you learn Python today, it will likely be useful to you for the rest of your life in a variety of situations.

Getting used to curly braces in ALGOL-like languages is a minor intellectual challenge compared to what awaits someone taking a Computer Science or Engineering degree.

Re: Python should not be taught as a foundational language

#28
I got intro'd with C. Enjoyed learning the low level concepts but I aint managing my own memory anytime soon unless I need that heap blazing fast.

Python was my vehicle to prototyping and implementing educative programs, I can hardly recommend anything else for a beginner. And arguments like other langs call this X are poor IMO.

The world of programming languages isn't 1 dimensional and no one should honor this notion of implied consistency that pleases your (and a student's) limited understanding of this ecosystem. I'd rather have students question and not critique such choices, and form their own educated opinions on what language fits them for what task.

Re: Python should not be taught as a foundational language

#29
> however in practice I find that it is much less legible and more kludgy to work with.

Can just stop reading here. I have seen many say this only the first few hours of trying Python, and that's it. So, this "kludgy to work with" indicates almost zero actual work with the language.

Re: Python should not be taught as a foundational language

#30

Absence of clear types is what driven me mad (and my ex), when my ex tried to learn python via interactive online courses. Constant questions like: "why this thing named a is a number and this one thing named "b" is now a list and this other thing does stuff". Switched to java, all problems immediately disappeared.

"I'm just adding numbers, why do I need 'public static void main'?"
Post reply on HN