Ex-product manager of an IDE and language here. Languages, like just about anything, win because of what you can do with them: ie, value. Consider Ruby on Rails: it drove Ruby; the achievement was easily creating fullstack web apps, at just the right time. Consider VB: you could build UI apps. No languages win based on the language itself but what it lets you achieve. Usually, this is in the form of libraries:* ie, f…
Ask HN: Why Did Python Win?
131–140 of 162 posts
Re: Ask HN: Why Did Python Win?
#132Earlier quoted context omitted.
> I wonder why activating a venv ended up being implemented as a script you source (updates env vars in the current process) and deactivate (puts them back) rather than being something that puts you in a subshell (detects your current shell and re-invokes it with new vars). The venv is just the folders and Python stubs. The activation script concept is probably just what happened to occur to Ian Bicking first. But al…
> But I think the use case you describe just doesn't resonate with a lot of people. Yeah I suppose "flat is better than nested" is right there in the zen. I guess I'm just an oddball. The idea of exiting all the way up to the root and finding nothing installed there except for the ability to descend into one or more specialized transient environments feels so... clean to me.
Re: Ask HN: Why Did Python Win?
#133It's hardly "inexplicable"... particularly if you're comparing it to Perl, a famously hard to read language. * Python has clean and readable syntax that a complete beginner can understand -- it's really close to the pseudocode you might use for teaching. * Python has a good standard library, so you can do a lot before you need to work out how to install more (and, reproducibility concerns aside, `pip install` is real…
That's putting it lightly. Many jokes were made at Perl's expense on that topic, but
$\=$/;for(@ARGV){open F,$_;while(){print if/$_/}}
is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Python sometimes scarcely even needs commenting if it's a short script if the writer uses descriptive function and variable names.Perl's downfall, was that coming back to a ball of Perl mud after say 3 years and have to fix a bug, due to lack of classes and Perl 6 being delayed forever, you were in for not lot of fun. Python isn't perfect and that's why it's grown types, but Perl was seriously write only at times.
Re: Ask HN: Why Did Python Win?
#134It's hardly "inexplicable"... particularly if you're comparing it to Perl, a famously hard to read language. * Python has clean and readable syntax that a complete beginner can understand -- it's really close to the pseudocode you might use for teaching. * Python has a good standard library, so you can do a lot before you need to work out how to install more (and, reproducibility concerns aside, `pip install` is real…
> a famously hard to read language. That's putting it lightly. Many jokes were made at Perl's expense on that topic, but $\=$/;for(@ARGV){open F,$_;while( ){print if/$_/}} is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Pyt…
Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl.
>> $\=$/;for(@ARGV){open F,$_;while(){print if/$_/}}
There are lots Perl one-liner patterns, once you learn to write them. You are basically saving yourself writing many dozen man-hours of Python/Java coding work.
I remember telling my manager during the Perl days. A 10 year Java experience guy looks great, but thats basically a junior Perl dev with 6 months experience.
There is nothing to feel great about wasting effort and more importantly time.
Re: Ask HN: Why Did Python Win?
#135I think the reason python won was that it was easy to learn and read and was batteries included. vs perl: People need to solve their problems, not fight with syntax Theres a lot of network effects as well. The more people were using it, the more people will use it.
This is also a big reason why AI assisted programming will wholesale replace Python programmers.
If your are optimising for people who wish to remain at beginner levels all life, and that replaced people using power tools to solve harder and bigger problems. It shouldn't be surprising that now some automation will replace you.
Re: Ask HN: Why Did Python Win?
#136Re: Ask HN: Why Did Python Win?
#137Re: Ask HN: Why Did Python Win?
#138Earlier quoted context omitted.
> But I think the use case you describe just doesn't resonate with a lot of people. Yeah I suppose "flat is better than nested" is right there in the zen. I guess I'm just an oddball. The idea of exiting all the way up to the root and finding nothing installed there except for the ability to descend into one or more specialized transient environments feels so... clean to me.
The other thing is, if you don't at least set $PS1 it gets hard to remember which level you're at.
Re: Ask HN: Why Did Python Win?
#139It is trivially learnable, absurdly flexible, and unmatched in ecosystem leverage. No simpler language delivers comparable reach.
Python may not be so suitable for systems, real-time, or performance-critical work—that’s Rust, C, and C++.
Nevertheless, every serious engineer must know Python, just as they must know shell/bash scripting. Non-negotiable.
Re: Ask HN: Why Did Python Win?
#140Earlier quoted context omitted.
> a famously hard to read language. That's putting it lightly. Many jokes were made at Perl's expense on that topic, but $\=$/;for(@ARGV){open F,$_;while( ){print if/$_/}} is a valid Perl program to grep for lines that are the file's name. One of the jokes was that it was a write only language and it was only half way a joke. Coming back to a pile of magic variables months later with no comments, omfg. Meanwhile, Pyt…
Every programmer worth their salt must learn to use power tools, and also train to work beyond the beginner-intermediate levels, that has now become the permanent situation in our line of work. Nobody should be spending a day writing Python to do work that can be done using a vim macro in like 5 mins. Or spend a year doing in Python what can be done in a week in Perl. >> $\=$/;for(@ARGV){open F,$_;while( ){print if/$…
Not sure your time-saving thing really works, especially if 99% of problems you have are not solved by a perl oneliner.