this post was submitted on 30 Jun 2023
25 points (93.1% liked)
Programming
17519 readers
402 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't like/use the
class
keyword in JS, because I quite like the paradigm with prototypes & stuff, and that keyword tries to make it fit into a totally different paradigm, which doesn't really work IMHO.With TS, I find it even more useless, because I can use TS as a functional language, with POD, functions and interfaces only. I've written entire projects without ever using and needing this keyword, which is a proof IMHO that it's an unnecessary addition. Not sure how unpopular is my opinion tho 😅
BTW, I've developped a few strats to have my own style in TS that I like quite a lot. I can tell more if you're interested.
I've read somewhere that Javascript is more of a prototype-oriented language rather than an object-oriented one. Do you agree with this?
Thank you! But maybe not right now; I'm still learning the basics. Have you considered write an article about it? 😮
JavaScript is a prototype-based language. The class keyword uses prototypes.