Live data from Hacker News

The Origins of Python

inference-review.com

21–30 of 73 posts

Re: The Origins of Python

#21
post #9

I feel Python changes and have changed too much to be a good introduction language anymore. It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Way too many concepts. It is being choose by intertia at this point and have been ruined for the original target user by former target users who are now professional programmers using it at work.

I feel like python has never been a good introduction language. It is simply too abstract and hides too many details that are often required in other languages (Python is simply too flexible). It is good to learn if you are only scripting or calling library API, but I feel like it is a poor starting point if the goal is to transition into languages with more rigid structures such as C++.

I upvoted you even though this is wrong because it raises a good point.

If I was teaching beginners I’d do 1/3 python assignments and 2/3 C.

They need some easy wins at the start and to learn control flow and basic concepts. But mixed in with that we’d do C and learn what’s happening under the hood.

The easy wins are so key. I remember my intro class and we had to just copy some C++ code and compile it. Even though I felt like I copied the code exactly I got these incomprehensible error messages and just felt overwhelmed.

I actually quit the class after feeling like nothing would work and not having any fun.

Only years later doing a project in Visual Basic did I realize coding could be fun.

Re: The Origins of Python

#22

Earlier quoted context omitted.

> I don't see why you would need to use decorators, generators or anything? You don't need to learn control flow, functions, variables, etc. I think the point here, is that when beginners start exploring what's out there in "professional" lands they'll quickly discover that they don't know Python at all, because they were using this primitive subset of a language.

But in what language is that not true? You start learning any language by pieces, and just because you know 10% of the language doesn't mean you're ready to write it professionally, this is true for any language.

> and just because you know 10% of the language doesn't mean you're ready to write it professionally

I don't see why not. Plenty of folks learn on the job, including new languages, and the way things work out you might end up implementing some things sort of by kitbashing, knowing relatively little of the concrete details that you end up learning completely more later on. I do this all the time.

Re: The Origins of Python

#23
Just as there is no such thing as a general-purpose transportation vehicle, a truly one-size-fits-all general-purpose programming language does not exist; for a given highly specialized application domain it will always be possible to design a language tailored to, and better suited for, the specific needs of that domain.

Reminds me of the discussion that surrounds Objective-S http://objective.st/About

Re: The Origins of Python

#24
post #8

Earlier quoted context omitted.

Large code bases are always going to be hard to read for beginners. As an introduction language, I don't see why you would need to use decorators, generators or anything? You don't need to learn control flow, functions, variables, etc. You can perfectly write python without all the fancy stuff. In fact, there are quite a lot of data scientists who are paid to write python and don't know the first thing about concepts…

> I don't see why you would need to use decorators, generators or anything? You don't need to learn control flow, functions, variables, etc. I think the point here, is that when beginners start exploring what's out there in "professional" lands they'll quickly discover that they don't know Python at all, because they were using this primitive subset of a language.

But that’s so exciting! More frontiers to explore!!

Re: The Origins of Python

#25
post #15

Earlier quoted context omitted.

Python is a good learning language precisely because it hides those details. This allows people to the learn the basics like variables, loops, strings, etc without getting overwhelmed with too much at once. This absolutely provides a good foundation to learn lower level concepts later, although going bottom-up and starting with a language like C is also a valid path. It’s also worth noting that a large proportion of…

While learning, hiding details is important, but Python overdoes the abstraction. `for` loops and iterator based loops have been merged into one thing, and I am sure people write `for i in range(10)` without a good understanding of what the `range` function does. Even strings blur the line between individual characters and actual strings. The lack of clarity at these basic concepts is precisely why Python is not suit…

Range is horrific for beginners. Try explaining to a kid learning coding why his times table program needs to say ```range(1,13)```. There are excellent reasons for this construction, and to prefer half-open ranges, but providing a good on-ramp for kids ain't one of them.

Re: The Origins of Python

#26

I feel Python changes and have changed too much to be a good introduction language anymore. It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Way too many concepts. It is being choose by intertia at this point and have been ruined for the original target user by former target users who are now professional programmers using it at work.

> It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it.

Having taught beginners both python and other languages, I’d say it’s significantly easier to teach decorators than it is to teach higher order functions normally. Because in python the students have already seen, used and understood what the cache decorator does before we even touch the concept of a function returning another function, which they always need some time to grok, both in python and other languages.

As for generators I’ve never seen anyone struggle with them. What do you find difficult to understand about generators?

Re: The Origins of Python

#27
post #8

Earlier quoted context omitted.

Large code bases are always going to be hard to read for beginners. As an introduction language, I don't see why you would need to use decorators, generators or anything? You don't need to learn control flow, functions, variables, etc. You can perfectly write python without all the fancy stuff. In fact, there are quite a lot of data scientists who are paid to write python and don't know the first thing about concepts…

> I don't see why you would need to use decorators, generators or anything? You don't need to learn control flow, functions, variables, etc. I think the point here, is that when beginners start exploring what's out there in "professional" lands they'll quickly discover that they don't know Python at all, because they were using this primitive subset of a language.

To compare, let's look at C. At "only" a couple hundred pages, the C language spec is simple enough. The language doesn't have all those fancy things like decorators, pattern matching, lambdas, etc.

But after 30 years of programming, do I actually know C? Once I dig into C compilers, undefined behaviors, etc. I can also quickly convince myself I actually don't know C at all...

Re: The Origins of Python

#28

Earlier quoted context omitted.

Python is a good learning language precisely because it hides those details. This allows people to the learn the basics like variables, loops, strings, etc without getting overwhelmed with too much at once. This absolutely provides a good foundation to learn lower level concepts later, although going bottom-up and starting with a language like C is also a valid path. It’s also worth noting that a large proportion of…

>>> Python is a good learning language precisely because it hides those details. This allows people to the learn the basics like variables, loops, strings, etc without getting overwhelmed with too much at once. I wonder if whether this is a blessing or a curse depends on the person who is learning it. For instance, my first language was BASIC in 1981, and so my gut reaction to discussions about learning languages is…

I'm not sure I understand what's missing in python compared with BASIC.

Sure, you can teach students to write `print(" ".join(str(x) for x in range(1, 11)))` to print numbers from 1 to 10... but you don't have to do that. In fact, `X = X + 1` works just fine. The old school BASIC style like `X = 1; while X What am I missing? (besides the misguided social expectation that you need to teach the fancy generator stuff to a total beginner...)

Re: The Origins of Python

#29
post #6

I feel Python changes and have changed too much to be a good introduction language anymore. It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Way too many concepts. It is being choose by intertia at this point and have been ruined for the original target user by former target users who are now professional programmers using it at work.

Ease of use and ease of learning are often at odds with performance. A go-kart is easier to learn and to drive than a Formula 1 car.

Some of the best drivers started out in go-karts, something about the feel of the road and getting the most out of such a limited vehicle.

I would not call python a go-kart I would call python a mini-van. Boring and looked down upon, but is the best vehicle around for doing your daily activities in.

Re: The Origins of Python

#30

I feel Python changes and have changed too much to be a good introduction language anymore. It is not possible for a from zero beginner to read ordinary Python code with decorators, generators or what not and understand it. Way too many concepts. It is being choose by intertia at this point and have been ruined for the original target user by former target users who are now professional programmers using it at work.

I still love the interactive interpreter. It's such a fantastic, no friction, teaching tool, especially for in person demonstration of fundamentals with immediate feedback. Its been an invaluable tool in showing my daughter (9) concepts I have difficulty describing in a way she can understand.
Post reply on HN