Here’s an unpopular opinion:<br><br>As a JS developer I have some gripes about Python’s design choices.<br>And yes I know that JS has its lot of horrible decisions too, but generally when being critical, I only consider those that weren’t created in the span of 11 days, aka the time that the creator of the language had to create it at its inception.<br><br>You want some examples?<br><br>* Python’s module system vs JS module (ESM) system: JS’s module system is better because 1. It allows you to name you modules however you want 2. It provides you with a syntax as powerful as Python but with the added benefit of being uniform 3. does not require you to have <i>_init_</i> files all over the place 4. manage their own encapsulation 5. cannot be modified at runtime without the designer developing it as such 6. uses paths to distinguish src from packages.<br>* f strings vs template strings syntax: template strings can be created both as functions as well as strings and additional functionality can be added to the parsing of the string<br>* (topic at hand: walrus op): Most statement in JS can also be used as expressions natively, which can allow the creation of functions on the fly and return as a callback and nobody made a tantrum out of it. To the best of my knowledge, in Python you cannot create a function on the fly and pass it to another function, exception being lambda expressions.<br>* Python wheels: I was pretty flabbergasted when I tried to build a Flask server that flask can only answer one request at a time unless compiled as a wheel and used with a uWSGI server. JS supports async natively through its concurrency model, just as pretty much every other programming language do with their own.<br>* Inability to use object notation on dicts: In JS an object is also a dict where keys are strings. the fact that these keys are string allows to use the . operator on them to refer to a key most of the time. Ex: object.key vs object[‘key’]<br>* Lack of native JSON support: JS object model allows an easy JSON support, which is not the case in Python<br><br><br>I know I’ll receive a lot of hate from this comment, but I can’t help but not understand why everybody see Guido as some kind of messiah when a lot of other languages have pretty sick features (sometimes better alternatives).<br>If anything, convince me. I’m curious.,(reply>), @Philippe Futureboy I agree that using the . notation is much easier and I use it when writing javascript because it is the standard but I don't love it because of the readability issues. In python I am more likely to write mydict.get('key') because if the key doesn't exist I won't cause an exception or I can supply a default. For the times I really want to raise an exception I can use mydict['key'] in a try block. It is clear to me when reading it that the latter could raise a KeyError exception and former won't. If the dot notation was used in python it wouldn't be clear which exception the dict would raise AttributeError or KeyError. In JS it obviously returns undefined which is a similar behavior to the dict.get method. This can of course lead to the issue of getting a TypeError in JS if you do data.key1.key2 and key1 doesn't exist. That kind of masks my true error. The same thing can happen in python with mydict.get('key1').get('key2') if 'key1' doesn't exist I will get an AttributeError but I really shouldn't be chaining get methods on a dictionary anyway since key1 is required for my code to work. I can do mydict['key1']['key2'] or mydict['key1'].get('key2') in a try block and catch a KeyError to deal with key1 not existing.<br><br>Similarly, I think it's good that python will raise an exception when you try to serialize an object that it doesn't know how to serialize. This means you need to write a custom class inheriting JSONEncoder and tell it how to encode it. This is pretty trivial and makes sure the data is encoded how you want/expect.,(reply>), Michael Finney Good point for the . vs [ ] notation. I still prefer the conciseness of the dot operator over the property accessor with the square brackets. I guess it’s also very relative to the object model of each language - in JS objects are the same construct as dictionaries, with the exception of the prototype property and a handful of functions (that nobody really uses anyway), so having the ability to use the dot or the bracket operator is generally a contextual choice based on your usage of the object . Mind you, the standard in JS is to use bracket notation only when needed. <br>TL;DR that’s a matter of preference. I still like having more freedom than less.<br><br>&gt; What do you mean by “lack of native JSON support”?<br>In JS JSON objects are a first class priority, and as such JSON.stringify/parse is blazing fast and objects are by default serializable. It comes with the downside that some things don’t serialize well however because they are not meant to be serialized. Such cases are circular-ref types and functions (curried). It also comes with the gotcha that JS is susceptible to prototype poisoning (remote code execution) if not guarded.<br>But on the other side, JS is almost never going to complain when you transform your objects in JSON, which makes it very useful for network requests.<br>My knowledge of Python is limited, but my understanding is that Python has the json core package with json_dump(s) and the parse equivalent. While it is functionally equivalent, let I remember Python can scream murder if you try to dump something that is not supposed to be serialized.<br>Another thing that is hot with JS’ dot notation is that you can straight up parse JSON and line those dots like nothing else ❤️<br>It just feels more nimble in its way to approach objects.,(reply>), What do you mean by “lack of native JSON support”?<br><br>Not using . for accessing keys on dictionaries is clearer even though it’s harder to type. Using the . to refer to a key works until it doesn’t work. Keys that conflict with properties or methods and keys that contain reserved symbols like - require the brackets syntax. It’s cleaner and more clear to use the same syntax for accessing all keys and makes it clear that something is a key and not a property.