News for hackers. Stuff that matters.
Re:JavaScript TC39 implementing hashmark private class fields by rocky1138 on Thursday August 03, 2017 @02:36PM (#14922394)
This is the primary reason I didn't like the idea of adding "classes" to JavaScript in the first place. Classical OOP doesn't really have a place here and all it does is invite the wrong type of thinking into the language.
Re:JavaScript TC39 implementing hashmark private class fields by just_astounded on Thursday August 03, 2017 @02:43PM (#14922459)
Agreed. We already had solutions for inheritance, etc... using prototypes, which are more powerful than classic OOP. Now we're in sort of a mess hybrid thing where issues like this are mostly unsolvable in a clean way.
Re:JavaScript TC39 implementing hashmark private class fields by stupidcar on Thursday August 03, 2017 @03:16PM (#14922810)
JS classes build on prototypal inheritance, they aren't an alternative mechanism. So you apparently either don't understand them, don't understand "classic OOP", or both.
Re:JavaScript TC39 implementing hashmark private class fields by just_astounded on Thursday August 03, 2017 @04:23PM (#14923476)
Yeah, I've only been doing OOP for about 22 years, so I'm pretty new to it.

The point was that the syntactic sugar isn't needed.

The 'class' sugar actually obscures the power of prototypal inheritance, and imho, discourages people from learning it - to their, and the language's, detriment.

Re:JavaScript TC39 implementing hashmark private class fields by camus2 on Thursday August 03, 2017 @04:30PM (#14923544)
> The point was that the syntactic sugar isn't needed.

Yes it is. The success of CoffeeSCript is absolutely a validation that developers are more productive with syntactic sugar such as the class keyword, destructuring and many many other features.

Now nobody forces you to use them. So why complain? It doesn't make Javascript harder to read for you, quite the contrary.

Re:JavaScript TC39 implementing hashmark private class fields by just_astounded on Thursday August 03, 2017 @04:47PM (#14923717)
> So why complain?

So it is your opinion that the community and users shouldn't give feedback on the design and direction of the language they use every day? That's an interesting approach to openness.