News for hackers. Stuff that matters.
Re:I'm writing a book about algorithms and Lisp by spraveenitpro on Tuesday July 23, 2019 @12:18PM (#20507887)
Can u make a JavaScript version?
Re:I'm writing a book about algorithms and Lisp by F-0X on Tuesday July 23, 2019 @12:48PM (#20508136)
Seriously, you should learn Lisp instead.
Re:I'm writing a book about algorithms and Lisp by allenu on Tuesday July 23, 2019 @05:32PM (#20510416)
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.

Re:I'm writing a book about algorithms and Lisp by cpursley on Tuesday July 23, 2019 @12:44PM (#20508109)
Sigh...
Re:I'm writing a book about algorithms and Lisp by cameronbrown on Tuesday July 23, 2019 @01:06PM (#20508287)
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.

Re:I'm writing a book about algorithms and Lisp by agumonkey on Tuesday July 23, 2019 @02:27PM (#20508999)
js as a semantic exercise left to the reader to fix
Re:I'm writing a book about algorithms and Lisp by hota_mazi on Tuesday July 23, 2019 @01:01PM (#20508243)
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.
Re:I'm writing a book about algorithms and Lisp by vseloved on Tuesday July 23, 2019 @01:11PM (#20508334)
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
Re:I'm writing a book about algorithms and Lisp by kazinator on Tuesday July 23, 2019 @07:57PM (#20511256)
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.