3 ms·
> - lots of "clever" things are possible in Python that just wouldn't be possible in the same way in Javascript JS has Object.setPrototypeOf(), among other thi
by dragonwriter 4y ago
> - lots of "clever" things are possible in Python that just wouldn't be possible in the same way in Javascript
JS has Object.setPrototypeOf(), among other things, so I doubt this.
- MrJohz 4y agoIn practice, that's very rarely used, partly because inheritance is so uncommon in Javascript programs. However, for a long time, Javascript lacked anything like the __getattr__/__setattr__ methods, it has no real operator overloading, and decorators are more limited and generally rare outside of certain ecosystems. These sorts of metaprogramming techniques that are very normal in Python are more rare in Javascript, and when they are present, they're generally easier to type.