Better HN
topnewbestaskshowjobs
Log inSign up

just_astounded

27 karma · joined Aug 3, 2017 (9y ago) · 12 submissions

Submissions

comment 9y ago · link · parent

If you like rsync and javascript, I wrote https://github.com/claytongulick/bit-sync which is kinda fun.

comment 9y ago · link · parent

Fancy!

comment 9y ago · link · parent

There are a lot of reasons, honestly, and it's great beer conversation, but from a high level: producing a concrete instance that invokes a constructor function with a shiny pristine 'this' to build on is a pretty great pattern. Add the ability to muck about with clever prototype manipulation, and you have pretty enormous power - you can do everything that classic OOP can do (if that's your thing) and a lot more.

comment 9y ago · link · parent

While it hasn't changed their minds, I do see the authors of the proposal actively discussing and engaging with the community. That's better than nothing, I suppose.

comment 9y ago · link · parent

I remember when Crockford released the fantastic book, JavaScript The Good Parts. I disagreed with some of his opinions in that book, like avoiding the use of 'new', but that book - more than almost anything else, helped me educate folks on how to use js well. I used to order copies for every member of my team. I wonder if, instead of a fork, we can just make a case for a subset of js. Take the good new things, and ignore the rest, like a modern "Good Parts".

comment 9y ago · link · parent

Until wasm has GC, we're not likely to see much in the way of compile-to-web outside of C, C++, or Rust.

comment 9y ago · link · parent

> 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.

comment 9y ago · link · parent

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.

comment 9y ago · link · parent

Don't we already have solutions (closures/WeakMap) for hard encapsulation? Seems like '#' just pollutes the language and isn't really needed.

comment 9y ago · link · parent

I think the concern is that if you look here: https://github.com/tc39/proposal-private-fields/issues/14 and other places, you'll see this massive push back from the community, yet the proposal is moving forward regardless.

comment 9y ago · link · parent

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.

12.

JavaScript TC39 implementing hashmark private class fields(github.com ↗)

36 points · by just_astounded · 9y ago · 76 comments