4 ms·
I'd love if we could have a better conversation about JavaScript than "the language is bad and if you like it in any way you should feel bad" but seemingly not
by taurath 10y ago
I'd love if we could have a better conversation about JavaScript than "the language is bad and if you like it in any way you should feel bad" but seemingly not today.
To create a bit to the discussion, I feel like the class abstraction in ES2015 is mostly a mask that doesn't do people any favors - it makes one think they know what is happening but leads experienced programmers to false reasoning and much head banging. I've highly preferred a more functional style for most of my projects and teams - I wish there were better standard tools for enforcing style, as organizationally it's harder to get everyone on the same page than with more mature OOP tooling (which OOP patterns/strong typing makes easier to build).
- LyndsySimon 10y ago> I feel like the class abstraction in ES2015 is mostly a mask that doesn't do people any favors I agree completely. When I first read the ES2015 draft, I was excited to see the class syntax. I assumed that it meant that JS was getting "traditional" inheritance, and it seems like a lot of others did too. That illusion was shattered shortly after beginning to use it. Now, instead of thinking "Hey, these weird objects that I barely understand how I created don't behave as I expect! Javascript is different.", I think a lot of less experienced developers end up thinking "Hey, these objects don't behave as I expect. Javascript sucks."
- jackmott 10y agoSeems like you kind of agree it is bad.
- rocqua 10y agoReally, the largest problem I see in javascript is exactly how it doesn't have a lot of features to enforce style. Sure, there is some other wonky stuff, but the ease with which one can write bad javascript is the core issue.
- treehau5 10y agoThis is a relatively solved problem with a proper .eslintrc and a style guide. You can pick two of the most popular -- airbnb or standardjs, npm install their eslint rules, and go on your merry way. Rolling your own and/or extending these is relatively simple.