Comment by spauldo
7 hours ago
I'll add another recommendation for Scheme. The concepts in SICP map very well into Scheme, whereas I can only imagine them being awkward and non-idiomatic in JS. There's lots of passing around first class functions and use of recursion.
One of the two professors (Dr. Sussman) that give the lectures in this series is a co-creator of Scheme.
> I can only imagine them being awkward and non-idiomatic in JS
You don't have to imagine, you can look at the code used in the JS version and it goes through some fun contortions to get around the fact that JS is not expression oriented (like Scheme). This is from page 35 (PDF: https://sicp.sourceacademy.org/sicpjs.pdf):
}
That certainly works, but it's awkward. Here's the Scheme code from the 2nd edition of SICP:
The JS code has to use the ternary ?: to get around the fact that it does not have a good equivalent to `cond`. You can see that they've gone through a literal translation of Scheme to JS that results in very unidiomatic JS code.