DEV Community

loading...

Discussion on: You don't need classes

Collapse
gdledsan profile image
Mundo

Well, I agree you don't need them for anytjing front end, which is where javascriot should have stayed.

Since JS began being a "general purpose" language, you do need eays to organize your code, and prototypes are just ugly.

Collapse
lukeshiru profile image
LUKE知る Author

I agree, prototypes are disgusting. If you read the article, you'll notice that I don't suggest we should use prototypes, what I said is that we shouldn't be using classes or prototypes, but actually just use functions.

Any language that has first-class functions can be used without classes anywhere (no matter if it's backend or frontend). Node (and Deno) enable JS in the back-end, so you can have both a classless frontend and a classless backend and even reuse utils in both with ease 😀

Some comments have been hidden by the post's author - find out more

Forem Open with the Forem app