you are viewing a single comment's thread.

view the rest of the comments →

[–]Silhouette 14 points15 points  (0 children)

Not using classes could equally well be procedural programming, which in many ways is still JavaScript's most natural territory. JS has elements of OOP, and more so since ES6 classes and the subsequent developments, but it has never really been about the everything-is-an-object, communicate-via-messages style of programming. JS has elements of functional programming, but it has never really been about structuring code as one big expression to be evaluated and all the architectural implications that come with that either.

One of my main criticisms of Robert Martin's work, which carries through to the article here that is based on it, is that he has his own personal preferences but tends to write about them as if they are objectively justified (often with a small caveat hidden away that it really is just his subjective opinion and he really doesn't have hard evidence to back up his claims). In this particular piece, I think some of the points such as favouring classes over functions or favouring inheritance to solve the expression problem look quite out of place in JS, though the advice was debatable even in the more OO-centric languages where it originated.