Live data from Hacker News

Interview with Douglas Crockford

evrone.com

41–50 of 107 posts

Re: Interview with Douglas Crockford

#41

Interesting. I had no idea he had transitioned from promoting Javascript's good parts to calling for its retirement. I started to get a bad feeling when the class keyword became popular, but all of the old good parts are still there.

I vastly prefer functional programming to OOP. But I find my use of `class` in JS increasing for two reasons orthogonal to the paradigm distinction: 1. Particularly in pure JS projects which either haven’t yet or won’t migrate to TypeScript, classes are an excellent way to define data types . They needn’t be stateful, they can be used just like POJOs in otherwise pure functional code. But their shape is clear (or can…

Seconding this

Re: Interview with Douglas Crockford

#42

Interesting. I had no idea he had transitioned from promoting Javascript's good parts to calling for its retirement. I started to get a bad feeling when the class keyword became popular, but all of the old good parts are still there.

> I started to get a bad feeling when the class keyword became popular, but all of the old good parts are still there.

I actually like many of the new parts - the class keyword being a notable exception. The other (much much milder) exception is async/await syntax - I love Promises but the async/await sugar on top of it this seems a little too much like magic. At the end of the day, they're still just Promises, just weirdly abstracted (just as classes are still just prototypes, just obscured so they look like something they're not).

The odd thing imo about the class keyword is it doesn't even seem to "fit" with the direction of may of the other new changes. E.g. arrow-functions are a very un-classy simplified functional form (no this re-assignment). This is very evident in the direction of many frameworks - e.g. React quickly moved to using classes (extends React.Component) and then quickly moved away from that convention (function components) as if realising their mistake.

Re: Interview with Douglas Crockford

#43

I am surprised he doesn’t like the more recent additions to JavaScript. I liked ES6 features quite a lot.

"The best thing we can do today to JavaScript is to retire it." I think that's a pretty interesting statement from somebody like Douglas Crockford. Not disagreeing; but still ... I think there are two ways of looking at recent changes in Javascript. Either it's progress or it's just not enough progress. I think what he is saying here is that there it has too much baggage and that there are newer and more interesting…

Javascript has GC and tail calls, and I don't think WASM is getting either anytime soon.

Re: Interview with Douglas Crockford

#45
post #24

Interesting. I had no idea he had transitioned from promoting Javascript's good parts to calling for its retirement. I started to get a bad feeling when the class keyword became popular, but all of the old good parts are still there.

Yeah, but the problem is that people will still use the new parts too. I never really liked any of the JS's attempts at OOP, be it the original prototype-based or the newer class-based, but I think that people were sufficiently confused enough by the prototype system that most people didn't bother with it. The class stuff is more approachable, and for some people that can sort of be viewed as a bad thing.

The newer class based IS the original prototype based. Class is literally just syntactic sugar on top of prototype inheritance. It was just added to help people coming from true OOP languages to feel comfortable. Notice, for instance, in Java the class acts as a blueprint for the object. You can’t have the object without the class. Not so in JS. The class is just window dressing and is not required at all.

Re: Interview with Douglas Crockford

#47
post #24

Earlier quoted context omitted.

Yeah, but the problem is that people will still use the new parts too. I never really liked any of the JS's attempts at OOP, be it the original prototype-based or the newer class-based, but I think that people were sufficiently confused enough by the prototype system that most people didn't bother with it. The class stuff is more approachable, and for some people that can sort of be viewed as a bad thing.

The newer class based IS the original prototype based. Class is literally just syntactic sugar on top of prototype inheritance. It was just added to help people coming from true OOP languages to feel comfortable. Notice, for instance, in Java the class acts as a blueprint for the object. You can’t have the object without the class. Not so in JS. The class is just window dressing and is not required at all.

Sure, but in practice most people ignore the prototypal features, especially if they're using the "class" keyword, so it may as well not be prototypal. Which is good, because the distinctly prototypal pieces are usually bad behaviors to rely on. The wrong kind of magic.

Re: Interview with Douglas Crockford

#48
post #24

Earlier quoted context omitted.

Yeah, but the problem is that people will still use the new parts too. I never really liked any of the JS's attempts at OOP, be it the original prototype-based or the newer class-based, but I think that people were sufficiently confused enough by the prototype system that most people didn't bother with it. The class stuff is more approachable, and for some people that can sort of be viewed as a bad thing.

The newer class based IS the original prototype based. Class is literally just syntactic sugar on top of prototype inheritance. It was just added to help people coming from true OOP languages to feel comfortable. Notice, for instance, in Java the class acts as a blueprint for the object. You can’t have the object without the class. Not so in JS. The class is just window dressing and is not required at all.

Most of this seems reasonably on point except for

> true OOP languages

Specifically the Java used as a example isn't exactly a "true OOP language" either; in a sense it's actually a very leaky imperative VM with implementation details like non-object Primitive Data Types and very visible and prominent imperative flow control structures.

Javascript is much closer to an actual "true OOP language" as, unless you're dealing with bad/naive bindings to other stuff in C, it's very hard to even get a handle of a non-object.

Re: Interview with Douglas Crockford

#49

Earlier quoted context omitted.

"The best thing we can do today to JavaScript is to retire it." I think that's a pretty interesting statement from somebody like Douglas Crockford. Not disagreeing; but still ... I think there are two ways of looking at recent changes in Javascript. Either it's progress or it's just not enough progress. I think what he is saying here is that there it has too much baggage and that there are newer and more interesting…

Javascript has GC and tail calls, and I don't think WASM is getting either anytime soon.

The experimental Kotlin WASM uses some experimental GC related flags in chrome. That stuff is working right now and will no doubt stop being experimental at some point. Tail calls might take a bit longer but there are probably people working on that too. But there are probably ways around that. WASM is already useful today and will incrementally get more useful over the next few years.

Re: Interview with Douglas Crockford

#50

Earlier quoted context omitted.

We tried this in a team a few years ago, and the problem we faced was developers literally falling asleep during readings. We found that the Team wasn't really engaging with the process and instead just tuned out until it was their turn. That doesn't mean I think Crockford's "Dailies" model is a poor one, it's just one issue to be aware of. Though I often find the same in Scrum teams. Folks aren't listening, they're…

Sounds like a problem with the team more with the process. If they don't care, they wont care.

> If they don't care, they wont care.

We need to accommodate human nature, not change human nature to accommodate corporate requirements. Its irrational to expect a group to rally passionately around every available task. Robotic.

Post reply on HN