HNHacker News
TopNewBestAskShowJobs

just_astounded

27 karma · joined August 3, 2017

submissionscomments
just_astounded··on Zsync: Differential file downloading over HTTP using the rsync algorithm (2010)
If you like rsync and javascript, I wrote https://github.com/claytongulick/bit-sync which is kinda fun.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
Fancy!
just_astounded··on JavaScript TC39 implementing hashmark private class fields
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.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
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.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
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".
just_astounded··on JavaScript TC39 implementing hashmark private class fields
Until wasm has GC, we're not likely to see much in the way of compile-to-web outside of C, C++, or Rust.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
> 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.

just_astounded··on JavaScript TC39 implementing hashmark private class fields
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.

just_astounded··on JavaScript TC39 implementing hashmark private class fields
Don't we already have solutions (closures/WeakMap) for hard encapsulation? Seems like '#' just pollutes the language and isn't really needed.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
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.
just_astounded··on JavaScript TC39 implementing hashmark private class fields
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.