Live data from Hacker News

Structure and Interpretation of Computer Programs – JavaScript Adaptation

sicp.comp.nus.edu.sg

81–90 of 188 posts

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#81
post #51

Earlier quoted context omitted.

> Why? Why does a textbook about fundamental principles need to be 'adapted' to technology currently in use in industry? Because it's widely used in the industry.

Why does that matter? You are not going to get paid to work through the SICP exercises on a job. Rather, you are going to use the things you learned through SICP on a job. Like deciding when JavaScript is the right tool and when it isn't.

> Rather, you are going to use the things you learned through SICP on a job.

That's my point. Is that bad somehow that it's written in a familiar and accessible language for the majority?

One can sharpen its knowledge without the barrier to understand a new language and syntax.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#82
post #78

Earlier quoted context omitted.

Typical dramatic Hacker News user. JS is a great language and enjoyed by millions of developers.

> JS is a great language literally no one believes this

The non-vocal majority does.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#83
post #7
post #3

There's kind of a reason why SICP was written in Scheme in mind and not a blub language...

JavaScript is heavily influenced by Scheme, this is actually mentioned in the linked to book.

Every single language in the industrial use today is pretty much influenced by Lisp. For that reason alone every self-respected programmer should get familiar with a Lisp - Racket, Clojure, Fennel, CL, etc.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#84
post #52

Earlier quoted context omitted.

There is a simple explanation of course. You are not the intended audience. Ditto for the blockbusters you mentioned.

The target audience are people who don't want to learn Lisp but want to write a bunch of Lisp interpreters and compilers. Obviously.

There's a reason SICP isn't called Structure and Interpretation of Lisp Programs. Lisp is incidental.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#85

Earlier quoted context omitted.

Yes, it's such a great language that `{} + []` is a valid program.

What an extremely weak criticism that has been played out. 1) Don't concatenate them in the first place 2) Use TypeScript Pro-tip, if the world is going JS and you don't get it, it's probably you. With JS (TypeScript) I can develop on every platform natively (React Native). I can compile to native code. (AssemblyScript). I'm not saying you can't do those things on other languages, but JS is becoming a powerhouse than…

Javascript is such a good language that, even after two decades of fixes, it's only good when you use a different language - specifically created to address JS's many problems - that compiles to it.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#86
post #78

Earlier quoted context omitted.

Typical dramatic Hacker News user. JS is a great language and enjoyed by millions of developers.

> JS is a great language literally no one believes this

I do.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#87
post #51

Earlier quoted context omitted.

Why does that matter? You are not going to get paid to work through the SICP exercises on a job. Rather, you are going to use the things you learned through SICP on a job. Like deciding when JavaScript is the right tool and when it isn't.

> Rather, you are going to use the things you learned through SICP on a job. That's my point. Is that bad somehow that it's written in a familiar and accessible language for the majority? One can sharpen its knowledge without the barrier to understand a new language and syntax.

If learning a new language and syntax is a barrier, you will not be able to follow SICP anyway, since it includes developing multiple languages in various paradigms.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#88
post #49

Every now and then a great movie comes out. Then it gets its American remake. It's been proven you can put Al Pacino, Robert de Niro and Bruce Willis in any movie (with predictable results!). This is the book equivalent of an American remake for me. Is Javascript the new pseudocode? Honestly I'd rather be forced to learn a new language to understand a book than to read the book adapted to JS.

Typical dramatic Hacker News user. JS is a great language and enjoyed by millions of developers.

I like JavaScript despite some of its quirks and there are some annoying ones. However with the mindset to embrace JS I find it easier to work with than blindly hating it. It could be worse. You could be coding in Monkey for Garmin.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#89
post #61

Earlier quoted context omitted.

> Why? Why does a textbook about fundamental principles need to be 'adapted' to technology currently in use in industry? Because it's widely used in the industry.

I don't know anyone who first read this book outside of college. Its concepts aren't exactly directly applicable to typical work. If you're given the task to build something in Javascript for work, it's probably not a metacircular evaluator or a register machine simulator, or even a closure-based object system. I'm curious who's reading SICP who finds it difficult to grok in Scheme, or more useful in Javascript. What…

That might change now. Someone might pick this up after completing a few JavaScript chapters in a JS specific book. I haven't read the book yet so I can't comment on the concepts, but based on your list it's a great resource for any newbie programmer, especially to those who are self taught like me.

> What are you doing in the industry that familiar syntax is top priority?

The question is more like: "Do I want to invest time into learning a new language just to read and comprehend new and interesting concepts?".

With endless knowledge out there, I usually gravitate towards the least friction.

> I would think that other books, specific to Javascript, would be a much better fit for people writing pretty much anything in Javascript.

I don't think of this book as the ultimate JavaScript book. It just uses it as the most accessible language out there, and that matters a lot imho.

Re: Structure and Interpretation of Computer Programs – JavaScript Adaptation

#90
post #26

Earlier quoted context omitted.

rebuttal https://journal.stuffwithstuff.com/2013/07/18/javascript-isn... although I don't necessarily agree that JavaScript is so minimal anymore.

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 JavaScript isn't what most people think of, and without macros, you can't build fuller-featured syntax on top of "The Good Parts."

And that's the real problem with treating JS as "a kind of Lisp." It's true that you can program in a certain minimal SICP-like style in JS, but if you have to write a Babel plugin to implement a new feature made out of closures and argument bindings... Then you really aren't programming in "a kind of Lisp" any more.

Post reply on HN