Sent: Friday, September 15, 2017 at 12:24 PM From: "Steven D'Aprano" <steve@pearwood.info> To: python-ideas@python.org Subject: Re: [Python-ideas] Make map() better
Jason,
I'm sorry if you feel that everyone is piling on you to poo-poo your ideas, but we've heard it all before. To you it might seem like "peaceful coexistence", but we already have peaceful coexistence. Python exists, and Javascript exists (to say nothing of thousands of other languages, good bad and indifferent), and we're hardly at war in any way.
Rather, what it sounds like to us is "Hey, Python is really great, let's make it worse so Javascript coders won't have to learn anything new!"
Um... what's in it for *us*? What benefit do we get?
Honestly, there are so many differences between Python and Javascript that having to learn a handful more or less won't make any difference. The syntax is different, the keywords are different, the standard library is different, the semantics of code is different, the names of functions and objects are different, the methods are different, the idioms of what is considered best practice are different...
Why, I could almost believe that Python and Javascript were different languages!
Really, there is no offense taken. Clearly, I am a genius and you all are wrong. ;-) But really, I've learned a few things along the way. Though nothing to convince me that I'm wrong or it's a bad idea. It's just not liked by the greybeards, which I can appreciate. "here's some new punk kid, get off my lawn!" type of mentality. Dunning-Kruger, etc. Hyperbole aside, you (and others) raise some very good points. I think your question deserves an answer:
Um... what's in it for *us*? What benefit do we get?
How that question is answered, depends on who is 'us'? If you're a bunch of python purist greybeards, then conceivably nothing. But, according to [Uncle] Bob Martin, the software industry doubles in engineers every 5 years. meaning that they greybeards are asymptotically becoming a minority. The features I've requested are to ease newcomers who will undoubtedly have JS* experience. * I may have focused too much on JS specifically, however I split my time between C/C++/Java/Python/JS. These days it's mainly JS and Python. But the request to move map(), etc to member functions is just an OOP-motivated one. The C++ or Java developer in me also wants those things. So now we have engineers coming from 2 other languages in addition to JS that would benefit. Why should it be Python? I have to admit this isn't about fairness. Clearly Python's concepts are superior to JS, but the responsibility falls to Python because it's far more mutable than the other languages. The process to improve JS if fraught with limitations from the start. Some are technical limitations, some are managing-body imposed, and some are just market share (there must be more than one browser implementation). Again, Python wins. At the end of the day, I'm just asking for a the 1% of enhancements that will eliminate 98% of the frustration of polyglots. I can't say with any certainty how that shape the future, but I would expect that it would make Python even more popular while increasing productivity. I can't see that there would be any real downside. Except that there would be more than one way in some scenarios, but that additional way would be balanced with familiarity with other languages.