Earlier quoted context omitted.
Yes, it's such a great language that `{} + []` is a valid program.
Every read about the crazy things you can do with C?
Structure and Interpretation of Computer Programs – JavaScript Adaptation
161–170 of 188 posts
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#162Earlier quoted context omitted.
> JS is a great language literally no one believes this
I like JS. I use JS daily. JS is part of the workflow for nearly everyone I know who works with code. For me, ES6 is fantastic to use. Some of the better books on JS [I'm thinking specifically of Haverbeke's "Eloquent Javascript"] are general computing classics in their own right. I used to be a snob about JS, due to the fact that in the 90s / early 2000s, it had major shortcomings and produced a lot of slow, crashy…
Up until a year ago or so I hadn't really had to use it much, I'm finding it so bad I'm seriously looking at how I can get into an alternate career. Working with JS is a profoundly miserable experience.
I hate what this industry has become.
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#163Earlier quoted context omitted.
I really enjoyed reading it! A small sample: About JavaScript features: “Don’t tell me it’s got lexical scope, because JavaScript’s scoping is an abomination in the face of God. Guy Steele isn’t even dead and JS scope makes him pre-emptively roll in his not-yet-occupied grave. Likewise, claiming JS is homoiconic because you can eval strings of code is nonsense. If that’s the only criteria for homoiconicity, then C is…
It's a wonderful read, but having used JS since well before it attained its current status as a combination floor wax and dessert topping... The scoping for "JavaScript, The Good Parts" is exactly the same scoping as Scheme. You can write expressive programs without ever using var, let, or const just using binding to named function arguments, which is very close to thinking in lambdas. Of course, that style of JavaSc…
"to be fair, it does have some stuff in common. So maybe it’s a fair comparison? I guess the real way to tell would be to compare Scheme to some other languages. The big feature that everyone harps on is closures. Maybe just having closures means you’re basically Scheme.
If that’s true, then C#, Lua, D, Erlang, Haskell, PHP, Scala, Go, Objective-C, Python, Ruby, and Smalltalk are basically Scheme. In other words, if JavaScript is Scheme by that criteria, then every language is Scheme, which of course means none of them are."
Just to add, Perl has closures too:
https://www.perlmonks.org/?node_id=690
and to quote again:
"This is why the “JS = Scheme” meme drives me crazy: it makes us dumber. It’s a thought-terminating cliché. It carries negative informational content and makes people actually know less about languages than they did before."
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#164Earlier quoted context omitted.
JS is a terrible language. The amount of pitfalls, language features you must avoid, and obscure paradigms you must follow to make JS usable is mind-boggling. Just because you can use JS well doesn't mean it's a good language.
Out of curiosity, what languages do you think are good ones?
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#165There's kind of a reason why SICP was written in Scheme in mind and not a blub language...
Please don't take HN threads into flamewar.
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#166Earlier quoted context omitted.
It's a wonderful read, but having used JS since well before it attained its current status as a combination floor wax and dessert topping... The scoping for "JavaScript, The Good Parts" is exactly the same scoping as Scheme. You can write expressive programs without ever using var, let, or const just using binding to named function arguments, which is very close to thinking in lambdas. Of course, that style of JavaSc…
Still, to quote Bob Nystrom again: "to be fair, it does have some stuff in common. So maybe it’s a fair comparison? I guess the real way to tell would be to compare Scheme to some other languages. The big feature that everyone harps on is closures. Maybe just having closures means you’re basically Scheme. If that’s true, then C#, Lua, D, Erlang, Haskell, PHP, Scala, Go, Objective-C, Python, Ruby, and Smalltalk are ba…
My personal "What makes Scheme, Scheme" predates current Scheme implementations by decades. But I go with, "There are five special forms that are essentially axioms of the language, and everything else is made by combining those forms with each other."
The deep elegance of building a rich language on top of a handful of axiomatic features is what makes Scheme feel Scheme-ish to me.
I understand that Scheme has evolved since everything was implemented in terms of the special forms, but still...
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#167Earlier quoted context omitted.
Can lisps place arbitrary code in types and formally verify complex properties of stateful systems--all in the same language? Doubt it. Lisp isn't the epitome of power.
Checkout Little Typer and Clojure.Spec. > Lisp isn't the epitome of power. Lisp is the epitome of simplicity. If the foundations based on simplicity you can do very powerful things.
And of course, Lisps that include meta-object protocols (Flavours, Common Lisp again, &c.) deliver power, very elegantly, but for people unfamiliar with them, there is a learning curve to climb.
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#168Earlier quoted context omitted.
I like JS. I use JS daily. JS is part of the workflow for nearly everyone I know who works with code. For me, ES6 is fantastic to use. Some of the better books on JS [I'm thinking specifically of Haverbeke's "Eloquent Javascript"] are general computing classics in their own right. I used to be a snob about JS, due to the fact that in the 90s / early 2000s, it had major shortcomings and produced a lot of slow, crashy…
I have to use Javascript almost daily at work, I hate it. Up until a year ago or so I hadn't really had to use it much, I'm finding it so bad I'm seriously looking at how I can get into an alternate career. Working with JS is a profoundly miserable experience. I hate what this industry has become.
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#169Earlier quoted context omitted.
Checkout Little Typer and Clojure.Spec. > Lisp isn't the epitome of power. Lisp is the epitome of simplicity. If the foundations based on simplicity you can do very powerful things.
Lisp in general is not the epitome of simplicity. Lisp-2s like Common Lisp add some cognitive load for those used to simpler languages (although Lisp-2s have their advantages). And of course, Lisps that include meta-object protocols (Flavours, Common Lisp again, &c.) deliver power, very elegantly, but for people unfamiliar with them, there is a learning curve to climb.
Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation
#170Earlier quoted context omitted.
No JS developer would do that. We all know that is global. Nowadays you use `const` or `let`. Any JS developer will have a linter that will tell them incase they somehow made that mistake.
Eh, I actually like JS but I have definitely forgotten to add a "var" or "let" a few times, or sometimes I will do it correctly, get a bit overzealous with cutting, and accidentally remove the initial var declaration. I'm not saying that it breaks the language, but it definitely is irritating, especially if you're not using a linter.
Also, I like knowing which variables won't be reassigned (const), and which will (let).