3 ms·
Great thing about JS is you never need to use any OOP.
by 8bitsrule 3y ago
Great thing about JS is you never need to use any OOP.
- pjmlp 3y ago> JavaScript is a high-level, often just-in-time compiled language that conforms to the ECMAScript standard. It has dynamic typing, prototype-based object-orientation... -- https://en.wikipedia.org/wiki/JavaScript https://en.wikipedia.org/wiki/JavaScript
- hajile 3y agoJS allows `”abc” > 124` and `with` but that doesn’t mean you’re forced to use them.
- pjmlp 3y agoIndeed, better not use strings and their methods.
- hajile 3y agoThat’s an absurd reductionist argument. I could argue that the actual implementation of them is subroutines, so it’s actually imperative programming, but that would also be absurd. There’s also a case that using those methods is indistinguishable from something like typeclasses which don’t involve classes at all. If we want to be even more pedantic, JS is prototypal and fundamentally lacks classes with objects simply having an optional pointer to B other objects, so the implementation of these methods doesn’t necessarily imply classes. You also have an argument that proves too much. If this argument is true, then your previous multiparadigm claim is proven false. In any case, it doesn’t seem like a good faith argument. There’s no reason I ever have to make my own classes in order to make projects in JavaScript. This is all a typical programmer is going to care about and is the spirit of my statement.
- pjmlp 3y agoAbsurb is pretending JavaScript isn't an OOP language. OOP isn't classes, I suggest education on OOP type theory, and regarding type classes, a few Symon Peyton Jones papers on how type classes in FP relate to OOP. ACM and SIGPLAN.