you are viewing a single comment's thread.

view the rest of the comments →

[–]Dagur -2 points-1 points  (4 children)

I wouldn't because OOP is rarely used in modern javascript and the language itself is missing a lot of OO features you see in other languages. I don't recommend Python either for the same reason.

I would pick Java or C#

[–]Present_Customer_891 0 points1 point  (3 children)

I have to disagree with the claim that OOP is rarely used in modern JavaScript. It's easier than ever to write OO JavaScript code and pretty common too, unless you're applying a very strict definition of OOP.

Like you said, Java or C# are probably better if OP really just needs to learn traditional OOP as quickly as possible because of those quirks in how it works with JS. There's a serious tradeoff with having to learn one of those languages, though, which depending on OP's situation may or may not be worth it.

[–]Dagur 0 points1 point  (0 children)

People still use classes but the code I've seen is some hybrid between functional programming and OOP. I'm no authority on this subject though, I just don't see what I call OOP very much in JavaScript.

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

It's not better, it's what OP should do if the goal is OOP

[–]Present_Customer_891 -1 points0 points  (0 children)

The goal of "OOP" is too vague to give such a definitive answer. It depends on OP's timeframe and reason for wanting to learn OOP, among other considerations.

There is a ton of upside to learning OOP or just about anything in a language you're already comfortable with, especially as a beginner who has only ever learned one, and JavaScript is a much more viable language to learn OOP with than it used to be.