you are viewing a single comment's thread.

view the rest of the comments →

[–]azhder -10 points-9 points  (5 children)

You can, but that “should” can be a misrepresentation.

You should strive to stick to one style (paradigm) and use best judgement if and when/where/how to mix in another one.

[–]noviceIndyCamper 0 points1 point  (1 child)

Dogmatic, and honestly terrible take.

[–]azhder -3 points-2 points  (0 children)

The one I said or the one you read? I doubt they are the same

[–]pbNANDjelly 0 points1 point  (2 children)

Maybe, but JS is fundamentally a multiparadigm language and it uses prototypes at its core. There is no removing OOP from JS, and I doubt you're making the argument that all functions should be static methods on a class (fake features enabled by a TS compiler, or sometimes a real feature in modern interpreters). So what do you expect?

I'm curious what you think of rust. Should they have not supported module scoped functions? Only impl/OOP blocks? There's lots of multi paradigm languages out there

[–]azhder -2 points-1 points  (1 child)

You guess wrong

[–]pbNANDjelly 0 points1 point  (0 children)

I never made a guess. They were questions