3 ms·
JS allows `”abc” > 124` and `with` but that doesn’t mean you’re forced to use them.
by hajile 4y ago
JS allows `”abc” > 124` and `with` but that doesn’t mean you’re forced to use them.
- pjmlp 4y agoIndeed, better not use strings and their methods.
- hajile 4y 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 4y 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.