Hacker News new | ask | show | jobs
by lambda 4660 days ago
SICP uses Scheme, not Common Lisp.

Scheme is a deliberately minimalist language, which is fairly accessible and easy to write your own implementation of. In fact, in SICP, you do that, a couple of times, writing first a Scheme interpreter, then extending it in various ways like adding logic programming capabilities, then you write a virtual machine and a compiler that compiles down to that virtual machine.

JavaScript is, well, a weird and warty language. You wouldn't want to try implementing JavaScript in an introductory CS class, and it's much less amenable to language extension like the logic programming variant of Scheme you implement in SICP.

But I notice that this translation of SICP into JavaScript doesn't got that far; it only goes up through Chapter 2 of SICP.

2 comments

JavaScript is rather minimalist as well. It has some warts, but they are easy to avoid.
> Scheme is a deliberately minimalist language

Ever looked at R6RS?

I'm not a big fan of R6RS, but it is still fairly minimalist. One of the good things that it did was divide the standard into a core language, and standard library built on top of the small core language. The core language eliminated many things from R5RS, but the standard library adds a lot more.

The main issues I have with R6RS are the library system (which I think is too complex, and it frustratingly adds an extra level of indentation as you need to wrap everything in one big expression), and some of the libraries in the standard library, like the I/O library, the Unicode library (which standardizes on such things as char-upcase and char-downcase, which are fairly useless in a Unicode context, without adding much that's actually useful).

R6RS is this kind of weird, awkward beast that's not sure what it's doing. It neither strips the language down to a minimal core, nor does it build up a comprehensive set of libraries containing all of the basics that people expect from standard libraries in a language these days.