News for hackers. Stuff that matters.
Re:Interview with Douglas Crockford by saiojd on Tuesday July 19, 2022 @11:47AM (#32153307)
I've always felt there's a disconnect between two groups of people, those who use a language in their day-to-day work and those who approach it more as an object of study (i.e. academics or hobbyists). The latter view bloat as a bad thing, while it's not the biggest concern for the former (who have more pressing problems!). So for Crockford an expanding language definition is catastrophic, but for people writing web apps, if 1 new feature out of 10 very useful then it's still a huge win.
Re:Interview with Douglas Crockford by capableweb on Tuesday July 19, 2022 @11:53AM (#32153459)
I'm not a academic nor hobbyist but work professionally with JavaScript for more than 10 years.

I'm also "against" the constant syntactic sugar that gets added with little to no benefits, just leading to JavaScript having a large syntax.

Why introduce "classes" which are just sugar on top of existing syntax? Many examples just like this, where sometimes it feels like JavaScript has changes just to have changes.

Although I'm not gonna complain too much, many of the new features are more than just syntactic sugar and makes my life a lot easier. I just wish they were slightly more conservative I guess.

Re:Interview with Douglas Crockford by LordN00b on Tuesday July 19, 2022 @12:41PM (#32154345)
To take your argument to the extreme, why have for loops, when then are syntatic sugar over while loops? I'm generally a fan of syntatic sugar in a language if it's purpose is to simplify what's already there; but it is a balance between developer productivity and ease-of-use. I once saw javscript described as 'pithy', becuase of it's small syntatical footprint, that's probably not true so much now.
Re:Interview with Douglas Crockford by ptx on Tuesday July 19, 2022 @01:52PM (#32155434)
I believe Crockford said in a talk [1] that he was going to stop writing loops when tail-call elimination is supported everywhere.

Also, avoiding the for loop in JS might be a good idea because of how easy it is to shoot yourself in the foot with "for (x in stuff) ..." creating a global variable (when you accidentally leave out "var").

[1] Probably this one? https://www.youtube.com/watch?v=XFTOG895C7c

Re:Interview with Douglas Crockford by kwertyoowiyop on Tuesday July 19, 2022 @02:02PM (#32155592)
Indeed. Just as with real sugar, a little syntactic sugar is great, but too much is icky.
Re:Interview with Douglas Crockford by saiojd on Tuesday July 19, 2022 @06:23PM (#32158771)
I agree with you, but you also agree with me, I think.

You said that, despite the bloat, you won't complain too much because some features make your life easier. That's precisely what I was saying!

Re:Interview with Douglas Crockford by tomgp on Tuesday July 19, 2022 @12:18PM (#32153932)
my feeling was that Crockford’s ‘…good parts’ was intensely pragmatic. About as far away from the academic approach you’re describing as i can imagine. A bigger, multi paradigm language makes it harder to read other peoples code as the chances are higher that they’re employing a different paradigm or alter a different idiom, a clear maintenance burden.
Re:Interview with Douglas Crockford by saiojd on Tuesday July 19, 2022 @06:28PM (#32158814)
Pragmistism literally means utility for problem solving. Who do you know solves problems using a Crockford-style subset of language features?

Note that, no where did I argue that bloat is good. I only said that it was tolerable given that some new features are useful. Maintenance burden is a real problem, but is still tolerated in practice.

I don't agree that subsetting a language is far from an academic approach. In fact this is what pretty much every PLT class does in order to make reasoning about language definitions easier.

Re:Interview with Douglas Crockford by tomgp on Wednesday July 20, 2022 @11:05AM (#32166800)
Identifying that subset of the language was paradigm shift in JS development. around 2008 when the good parts came out i don’t know any serious JS developers who didn’t take on board many of its lessons. examples: avoiding ‘this’, understanding the value of functions as first class citizens, understanding closures. these weren’t unique to crockford but by presenting them in an accesible plain spoken way he moved the state of the language forward.

i do agree that there’s a need to weigh the value of new features vs bloat but id say 1 good feature in ten is pretty poor odds.

another example of crockfords pragmatism is JSON which for all its flaws has been a real boon.

edit: un-auto correcting “crockpot” :D

Re:Interview with Douglas Crockford by saiojd on Wednesday July 20, 2022 @05:34PM (#32172685)
Interesting points, thank you! JSON is a great example, I understand what you meant now.

That being said, I really wish JSON had comments :P

Re:Interview with Douglas Crockford by irrational on Tuesday July 19, 2022 @01:58PM (#32155532)
And those new features are usually new/different/“better” ways of doing what you could already do in the language. You can totally use JS without using any of the ES6+ syntax.
Re:Interview with Douglas Crockford by saiojd on Tuesday July 19, 2022 @06:24PM (#32158785)
Do you do this personally, or do you use ES6+?