Keith Ensign
1 min readAug 20, 2016

--

Hi Bill,

I thought about what you said about classes leading to poor design, (I hear these arguments about how bad classes are for x,y,z reasons) and I wanted to retort with, classes are just typed objects, just like anything else in the JS API.

Then I came across your article again and I really get what you're saying about modules. I too have strong OO background from other languages, so when I saw that ES6 handled classes and the scoping so much better than before, I felt at home.

But your code samples illustrate an excellent point that I know I wasn’t grasping: functions for the pure sake of clean importing. I do write static methods and variables on classes, but I have failed to realize that this is truly horrible as ‘const’ is really what I need to use as it is immutable and these should be used use modules, not classes.

So even though I still think classes are appropriate when used correctly, I’ve learned something and now I have a bunch of code to refactor :)

Thanks for the great advice.

--

--