Hacker News new | ask | show | jobs
by jerf 2820 days ago
Well... it was easy to learn. It really isn't easy to fully learn it as it used to be.

I think there's a fundamental gulf between "easy language" and one that you'd want to do work in long term, and the history of Python is a great case study in that. If there aren't any "easy, real languages", well, if you want to fix that you'd better carefully study the reasons why all the easy languages have stopped being easy on their way to becoming real languages or you'll just repeat the mistakes of the past.

2 comments

What do you think makes Python more difficult to learn now than it used to be? It seems to me that there are even more tutorials now. Also, the confusion between learning 2.7 or 3+ is pretty much completely gone at this point, while the base core of the language remains as simple and readable as the older version in my opinion.
I don't think the number of tutorials matters, otherwise Haskell monads would be super easy to learn. ;-)

Python circa 2000 was a language that was easy to learn. [1] What you saw was basically what you got. Python in 2018... well... it has grown lots more features, which might not show up in tutorials but a beginner will see them as soon as they look at actual code. List comprehensions, generators, context managers, metaclasses, async/await, decorators, 2/3 split, ABCs, etc. Useful? Yes. Easy to learn or understand for a newbie? Maybe not so much.

Never mind that setting up an environment is no longer as easy as creating a 'lib' directory somewhere in $PYTHONPATH and unzipping files in there. Now we have many package managers, virtual environments, competing Python versions, you name it. Back in the day I started a Python "project" with a single file and worked from there, growing as necessary. Nowadays I see new projects with a dozen files and directories. Again, there are (presumably) reasons for all this, but easier it certainly is not.

[1] Although even then the "Programming Python" book was like 900 pages... http://shop.oreilly.com/product/9781565921979.do

Welp, Python+numerics/stats stack is really messy; new stuff like coroutines can be a mindfuck. But what of what was once easy in Python is now harder?

Parentheses after print statements?

"It really isn't easy to fully learn it as it used to be."

If you carve out the Python 2.0-ish subset and taught a class on that, it would be as easy as it ever was. But if your students take that knowledge and go to the Django tutorial, they're going to find themselves missing several concepts, and Django doesn't even use everything in Python, being rather old itself.

That said, I still think I'd rather take a Python 2.0-ish subset and teach students that, than give them some new custom language that they can't expand on or use in the field. Python 2.0-ish is still pretty useful and there's a clean upgrade track if you do want to continue down that road. And even the latest Python is still, at worst, middle-of-the-pack on language difficulty, if not still trending towards the easy side in the list of top 10-20 languages. But it's definitely a non-trivial upgrade path now.

A few things come to mind... Installing it. Setting up a project. Learning the whole language. Reading other people's code. Understanding how things work behind the scenes. Less surprising code, in the sense that it does what you expect.

I would add, "finding a third-part library", but that was mostly because there were not as many. :) Then again the current glut of libraries is a bit of mixed blessing. I can look for a library that does X and find dozens of them. Very few of them will be mature or do what I want. But that has more to do with the ecosystem than with Python-the-language.