Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can u make a JavaScript version?


Seriously, you should learn Lisp instead.


Exactly. I started going through the SICP book recently, not having used Lisp all that much. After several exercises I see why Lisp is useful for teaching: the syntax doesn't get in the way.

If JavaScript was used, the code wouldn't be as straightforward to write and read and you'd have to spend time going through the language's syntax for the reader (or assume the reader knows it already), all getting in the way of just teaching the algorithms themselves.


Sigh...


The flaws with JS run deep, but it's still the most accessible language out there today. And it does have the most impact. Anybody can make a website.

That being said C/C++, Python and Go are more fun for implementing pure algorithms/data structures as the language constructs are more designed around that.


js as a semantic exercise left to the reader to fix


It's a legitimate question. As much as I love Lisp and prefer it over Javascript, focusing an algorithm book on just Lisp considerably reduces its audience.


I would suggest you to read it before jumping to conclusions (as the new chapters will be published). Lisp will not be the main focus of the book, for those who don't plan to use it at work, it may be perceived just as pseudocode. As for Javascript, I believe that explaining algorithms using it is counterproductive as the language has too many limitations that will impede expressing everything I need idiomatically. I'm not saying that you can't program algorithms in JS, but it's not pleasant and productive. Besides, JS is not the language I'm interested in, at all


The audience for a JS book is is also possibly tiny; people who want a JS book already either already have one (or more) and are not looking, or else are likely going to choose one of the many JS books that you didn't write.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: