10 ms·
The Origins of Python
- dm319 4y agoFascinating read, wasn't aware of this history of python. I thought the line about the fear of not having a copyright statement for ABC was interesting - and applies to many aspects of life in general where setting things free is the right thing to do but also scary.
- rightbyte 4y agoI 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.
- int_19h 4y agoA zero beginner doesn't need to read ordinary Python code with decorators etc. The beauty of Python as a teaching language is that none of those things are necessary to explain or handwave to write simple apps that just input and print strings and numbers - which is just enough to teach basic concepts like conditionals, loops, functions etc. For bonus points, it even has turtle graphics out of the box, which is an excellent visual explainer for more advanced concepts like recursion. And when they've learned the basics on toy stuff and want to start writing real-world apps, that is when you explain decorators, generators etc. And yet they don't have to switch to a whole new language - all the basics they've learned still work exactly as they did before.
- musingsole 4y agoMicroPython or CircuitPython have become better entry points than the full language. Python grew up and has been chosen to solve a lot of complex, important problems. This has lead to the language ballooning to become not just good but excellent for those problems (data science). Some of it might be fluff; much of it might not be relevant to your style or problem space.
- rightbyte 4y agoYe for the professional programmers using Python I guess the changes are welcome. It is easier to keep up with additions over time rather than getting them all at once. C++ has the same problem, but it's selling point has never been easy to use.
- TheOtherHobbes 4y agoI'm one of those people who worry that Python - which used to be pretty accessible - is heading in the same direction as C++, and will be buried under archaeological layers of cruft and obscurity. 2.x and 3.x seem to be diverging philosophically, and I'm not convinced that's a good thing.
- pjmlp 4y agoC++ during the 1990's was easy enough to be learnt by high school kids.
- Merrill 4y agoEase 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.
- tyingq 4y agoThrowing money/time/effort at it sometimes changes things. Javascript and PHP do pretty well on some specific workloads now for example.
- somat 4y agoSome 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.
- nicoco 4y agoLarge 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 as seemingly basic as classes.
- wiseowise 4y ago> 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.
- lagt_t 4y agoBut you always start by using a primitive subset of a language.
- capableweb 4y agoBut 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.
- pen2l 4y ago> 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.
- ceres 4y ago
- au8er 4y agoI 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++.
- nicoburns 4y agoPython 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 developers will never learn C++, and will stick to higher level languages their entire career. And another chunk will only learn the lower level stuff much later when they have many years of experience to lean on. If your goal is to immediately become a C++ developer, then you should learn C++, but that isn’t most people learning to program.
- analog31 4y ago>>> 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 that BASIC lets you at least imagine the workings of the machine that's running your program. The teacher can draw boxes on the blackboard to explain 10 LET X = X + 1 And we weren't far from the machine. There were not very many turtles on the way down to the level of logic gates. I also learned how a microprocessor worked, reading books as a high school kid, and articles in Byte Magazine, something that would be laughable for today's big CPU's. That's a bottom-up approach. For others, a top-down approach might be better, e.g., seeing mathematical equations develop, in beautiful notation, without caring what the machine is doing under the hood. Another comment in this thread mentions the ability to read code. Python has sprawled. I've been coding in Python for 10 years (as a "scientific" programmer) and recently took a Python skills quiz. I mentor beginners. Yet I scored barely at the top of "average." I can't read the code that's in a lot of the more elaborate Python packages. A problem is motivating people to learn a learning language when they know that they'll outgrow it.
- pjmlp 4y agoMany of those concepts were already present in the language for the last 20 years.
- isitmadeofglass 4y ago> 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?
- Too 4y agoGenerators have a few footguns even for seasoned developers, calling len(mygen) or mygen[4] works, but after that it's empty when trying to iterate it. Particularly problematic is when someone adds a log of the generator content, exhausting it before before it is used. All this leads to people shotgunning mygen=list(mygen) on everything, without understanding what really happens. How one could solve this i don't really know, generators are such useful concept that you can't really remove them either, and you still want them to be compatible everywhere other lists and iterables are. Even with type hints, it's not exactly obvious when you type the code whether a certain variable is a generator or a concrete list, both of them mostly adhere to the same protocol.
- nazgulsenpai 4y agoI 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.
- Brajeshwar 4y agoA well written article on the origins of Python without ever mentioning Monty Python[1]. 1. https://en.wikipedia.org/wiki/Monty_Python https://en.wikipedia.org/wiki/Monty_Python
- andsoitis 4y agoJust 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 http://objective.st/About
- eachro 4y agoWhat are other good options for intro programming languages if not python?
- jstx1 4y agoC, JavaScript, any other general purpose language as long as you have a good teacher. I think the importance of which language you pick first is really overrated.
- pletnes 4y agoI disagree, pick an interpreted language that doesn’t need compilers or other complicated setup. Python, javascript, something where there’s little friction to getting started, and which has a REPL. Pick a language that a friend or colleague can help you with, this is probably an even bigger advantage, if possible.
- jstx1 4y agoMy first language was C++ (a very C-like flavor of it) and I really appreciated it later on. A compiler isn't complicated setup (in fact in many cases it's easier than managing Python/JS dependencies). I really believe in giving people who are learning more credit that they can actually learn instead of trying to dumb things down for them. And I don't mean that JavaScript or Python are dumbed down, I think they're fine first languages too; my point is about generally trusting beginners to learn things instead of unnecessarily simplifying stuff.
- adam_arthur 4y agoLearning is driven by motivation. Motivation is diminished by unnecessary difficulty. Thus, learning via languages that are easier on the uptake will lead to better results. Memory management and type safety can easily be learned later on... the core essence of programming doesn't involve either of those. It's about defining and composing abstractions, which is language agnostic.
- 4y ago
- revskill 4y agoA Python beginner spent 5 years to learn Python. That's what my friend's experience when he tried to switch to programming years ago. A beginner with Javascript spent 6 months to make backend API, desktop , mobile, web applications with SQL in no time. The reason i think lies in something more deeply cultural: He think Python is the only thing he should know, nothing else is needed.
- Jtsummers 4y agoThose sound like two very different individuals, or like they chose very different sets of learning materials/teachers. The difference between Python and JS for that is almost nonexistent except that it can't be used (directly, or at least not easily) as the frontend for a web application (in the browser). > The reason i think lies in something more deeply cultural: He think Python is the only thing he should know, nothing else is needed. That's the problem, then. And it's also not part of Python "culture", it's his problem (but not just his, others fall into the same trap). I've had plenty of colleagues who swear by C, C++, Javascript, <language of their choice> and are incompetent or barely competent in any others. He made a mistake, which is unfortunate. He would have benefited from a mentor (or a better mentor if he had one). Real programmers understand that languages mostly don't matter except with regards to the libraries they have access to or the platforms they run on.
- revskill 4y agoThat made me think for a long time. Because when i choose a language to teach newscomers/students, it's really important for me to not make them fall into the trap due to the culture. Newscomers is different from experienced programmers who know language is just a tool.
- coffeeblack 4y agoGuido was today on Lex Fridman’s podcast: https://podcasts.apple.com/de/podcast/lex-fridman-podcast/id1434243584?i=1000587562136 https://podcasts.apple.com/de/podcast/lex-fridman-podcast/id...
- spenrose 4y agoRuby and Go both adopted extensively from Python, but both rejected the process described in OP of designing a language by iterative experimentation to determine how coders would experience design choices. Instead, each relied on the judgment of a handful of experienced insiders. "*I* know which parts of Python are good and which suck; no need to run my ideas by a few dozen coders before committing to them." Perhaps not coincidentally, neither has displaced Python. Go obviously had powerful backing from Google. I believe Ruby had enormous tailwinds from the need of the Java community c. 2005 to find an interpreted language, but not one with as mature a community as Python's was at the time. Ruby was at the sweet spot of "usable, but with plenty of niches left for alpha geeks looking to write blog posts." Finally, I hypothesize the Amber-Brown-batteries-included and walrus-operator kerfuffles demonstrate the limits of managing infrastructure such as Python with the RFC / Usenet model.
- pjmlp 4y agoWe hardly had any need for a slow language without any kind of JIT and a basic GC.
- bb88 4y agoA decade or so ago there was an idea that "patterns" (Gang of Four) needed to exist because the underlying language (Java, etc) was limited in it's power or expressiveness. Go is opinionated, and much of that has hurt the language -- with the go loop semantics coming to mind. Instead of realizing their mistake early and fixing it back in 2009ish, they doubled down on it. Here in 2022, they finally opened it back up for discussion. https://github.com/golang/go/discussions/56010 https://github.com/golang/go/discussions/56010
- johnisgood 4y agoThere was a recent thread about the Amoeba[1] operating system for which Python was initially created. I mentioned Sprite[2], for (or from) which Tcl was initially created. [1] https://en.wikipedia.org/wiki/Amoeba_(operating_system) https://en.wikipedia.org/wiki/Amoeba_(operating_system) [2] https://en.wikipedia.org/wiki/Sprite_(operating_system) https://en.wikipedia.org/wiki/Sprite_(operating_system)
- kazinator 4y ago> When an object is only partially visible, the human visual system extrapolates from the shape of the visible part to form an expectation of what is occluded. Yes, for example if I see this: blah () { whatever whatever I know that it is not complete; something is occluded. At the very least, a closing brace: } Here, I do not know: def blah(x): foo bar that could easily be the whole thing, or it could be the first three lines of five thousand.
- Terretta 4y agoSorry, what's "occluded" in this example? The } is occluded, so you don't know if it's the whole thing or 3 lines of 5000. Similarly whatever outdented thing comes next is occluded. Is there a perceivable difference between these?
- kazinator 4y agoWe know it's not the whole thing because the closing } is missing.
- indydevs 4y agoIn case I wasn't the only one who wanted to run a few toy programs in ABC after reading the article, I've wrapped it up in a very rough asdf plugin here: https://github.com/alisaifee/asdf-abc https://github.com/alisaifee/asdf-abc