Old Man Yells At Cloud

Ned Batchelder ned at nedbatchelder.com
Sun Sep 17 17:19:20 EDT 2017


On 9/16/17 1:38 AM, Steve D'Aprano wrote:
> /rant on
>
> So apparently everyone who disagrees that Python should be more like Javascript
> is an old greybeard fuddy-duddy yelling "Get off my lawn!" to the cool kids --
> and is also too stupid to know how dumb they are.
>
> "Hi, I've been programming in Python for what seems like days now, and here's
> all the things that you guys are doing wrong. I insist that you fix them
> immediately, it doesn't matter how much code it will break, that's not
> important. What is important is that Javascript programmers like me shouldn't
> be expected to learn anything new or different when they program with Python."
>
> /rant off
>
> And no, for once it wasn't Ranting Rick.

The thing that struck me about the interaction (on Python-Ideas, btw) 
was that Javascript actually is adding new language features at an 
impressive pace, and many of them seem very Pythonic.  But they 
sometimes choose different syntax.

For example, their "spread" operator is ..., where Python uses *:

     new_list = [new_start, *old_list, new_end]

vs:

     new_array = [new_start, ...old_array, new_end]

Making Python more like Javascript (in this case) would have required 
breaking existing Python programs. Javascript could have use * as the 
spread operator without breaking anyone. But they didn't, and I wonder 
if anyone petitioned them to keep compatibility with Python to easy the 
plight of the multi-lingual programmer.

--Ned.



More information about the Python-list mailing list