Why? The book is not about how to program and build languages in racket. It is about how to program and build languages in beautiful racket (br). Learning how br was written is a good exercise for the reader, but it's not necessary to effectively use br
The Little Schemer may be slightly better, but on its own, it too is not about learning Racket.
Although they overlap on some topics, comparing little schemer to htdp is comparing apples to oranges.
Also, htdp is just racket in my opinion, it differs very little from the students languages, I did the whole thing using just plain racket and didn't have any problems that couldn't be solved in two minutes visiting docs.racket-lang.org (and they were rare), but sure, you won't get to know all of racket because that's not the point of the book.
I do think there is a need for more YouTube videos on the basics. I seriously think Racket is way better than any other for scripting and quick programs. It just needs some more libraries which comes with more developers.
THE ONE WEAKNESS OF RACKET = Everyone just solves the same problems over and over again because it is so fun and easy.
Most dense book ever
Took my 30 restarts to get through it. This is my way of doing programming books: Read till I get stuck or feel unconfident in what I learned. Restart at page 1 and I ALWAYS get through where I was stuck. Get stuck go back to page one, rinse and repeat.....
Seriously I am an old fart that read a book to learn Assembly for C64 when I was 11. I have never had something fundamentally change the way I do anything. I mostly write R and my R writing style is night and day different and I could use the Scheme parts of it.
Highly recommended.
Secondly, go through Realms fo Racket with a kid (I did with my 10-year-old daughter). Teaching is the best way to learn.http://www.realmofracket.com/
This book specifically is in need of significant editing.
As an alternative, see the incredibly good “How To Code” class from UBCx on EdX (don’t be put off by the title). It’s a direct implementation of the approach in this book.
Initially I loved the support for multiple languages via #lang, but in practice it's not as easily composable as I would like (e.g. there's no way to combine multiple languages in a single file), and it sometimes tends to hide an API that I'd like to use behind #lang magic (priority sometimes, but not always seems to be given to documenting the use of a language via #lang vs. using its API).
The lack of an ability to install a library locally, along the lines of npm or virtualenv, was a surprise. Especially combined with the approach to packaging versioning: There is no versioning. When a package is updated, everyone gets the new version and there's no way to ask for an older version:
10.5 How can I specify which version of a package I depend on if its interface has changed and I need an old version?
In such a situation, the author of the package has released a backwards incompatible edition of a package.
The package manager provides no help to deal with this situation (other than, of course, not installing the
“update”). Therefore, package authors should not make backwards incompatible changes to packages. Instead,
they should release a new package with a new name. For example, package libgtk might become libgtk2. These
packages should be designed to not conflict with each other, as well.
I like Racket. But there are enough small things (like these, and a few others, like e.g. not getting stack traces on errors in the unit test runner) that I would probably choose Clojure for my next Lisp-appropriate project.
My only complaint is that because it is so directed (you're writing a programming language and it wants to get you there very quickly) it abstracts a lot of stuff that you'll need to know if you're doing anything other than following this book. For instance, a lot of the code you write will start with
Instead of the usual Racket That's using some support from Racket where you say "I'm writing the `br` language" and Racket goes and runs your code in that language instead of Racket. That "language" is really just Racket with some libraries pre-included (https://beautifulracket.com/appendix/from-br-to-racket-base....) and some of those libraries are specific to the book (e.g. https://docs.racket-lang.org/br/index.html?q=br#%28mod-path....).So if you're following along the book, the upside is that that he can skip explaining a bunch of stuff about Racket packaging and libraries. But the downside is that he skips explaining a bunch of stuff about Racket packaging and libraries. If you want to take what you've learnt here and go write a programming language in Racket, you're going to have to go and learn all of that stuff anyway. You're going to have to take apart `br` and figure out how to map its parsing stuff to Racket's and you'll find that almost none of the scaffolding from the book can be copy-pasted without including the book's libraries, and many of the concepts aren't even reuseable if you want to use Racket's parsing tools instead of the book's largely bespoke tools. (Just including the book's libraries themselves can be difficult because of how Racket's packaging works. In the New World of Racket packaging, you install a library _on your machine_, not as a dependency of your project. So if you want to run your code on another machine, you first have to manually install the library on that machine before your code can run, and Racket's tooling around this is currently very sub-par.)
But I'll say again that it's a great book and if you're interested in Lisp and Scheme in particular, you should buy it and you should read it. It's great. Just know that you'll have to read the book _and also learn Racket_.