5 ms·
I'm not sure what world you live in but I remember quite well when prototypical inheritance was The Way in JS to do object-oriented programming. Then they copie
by Daishiman 1mo ago
I'm not sure what world you live in but I remember quite well when prototypical inheritance was The Way in JS to do object-oriented programming. Then they copied the C#/Java syntax for classes. Then they aded a bunch of reactivity with Observable with a ton of quirks.
Every single new, large feature in JS has been full of quirks. The same cannot be said for Python; the exceptions are few and far between and more often than not they're not actually exceptions but rather something bound to core language fundamentals which once understood don't present a challenge because there is an actual underlying consistency.
- Izkata 1mo agoYou've probably just gotten used to it so you don't notice it anymore: https://github.com/satwikkansal/wtfpython https://github.com/satwikkansal/wtfpython (Note some of these are outdated, but some of those only mention that towards the end of the section rather than the beginning)
- Daishiman 1mo agoIf you read it you'll realize that, very much like I said, the Python WTFs have to do with mechanisms that not obvious but are consistent. This is far better than Javascript, where the underlying mechanisms may be superficially obvious in some subset of cases, but are not consistent and generate many special cases.
- frollogaston 1mo agoThe Python wtfs are definitely more consistent than the JS wtfs.
- frollogaston 1mo ago11 years ago sure. Then the classes they added were syntactical sugar. Observable was never part of JS, it's from the rxjs lib that I avoided cause yeah it's spaghetti. In about the same timeline, Py went from threading to async-await, which created classic blocking vs nonblocking mismatches. The whole 2 to 3 breaking migration was also still a big deal in 2015.