Hacker News new | ask | show | jobs
by digorithm 3007 days ago
Wow, this is huge!

I'm stoked for the book. I'm surprised-but-not-really that it will use JavaScript as its main language to teach the concepts!

> When I wrote the first edition I was frustrated that I was having to write the book's code in a language that was significantly worse than the language I preferred (Smalltalk). Little did I know that I would take another step downwards twenty years later.

Oh, the irony!

1 comments

But the compelling reason for choosing it over Java is that isn't wholly centered on classes.

That doesn't explain why choose it from among the majority of other languages that aren't centered on classes. JavaScript is so quirky, it seems like a really strange choice for a general programming book.

Perhaps it's my back end bias showing.

He probably went where most developers are. Just like choosing Java over Smalltalk for the first edition.

I feel its better to reach more developers, than aim for the best technologies that very few are actually even aware of.

Exactly my thoughts!
Python is amazing for these types of books. Written with the intention in mind, the actual code reads like pseudo-code, and a good percentage of people have interacted with the language at least briefly. Though the latter point is certainly more relevant for JS.

I'm sure the author had his reasons, and there are certainly worse choices in the top dozen languages. (Refactoring... in PHP!)

From the article:

> Such a language needed to be widely popular, among the top half a dozen in language popularity surveys. It really helps to have a C-based syntax, since most programmers would recognize the basic code structure

You can argue others, but at least this will help you understand why he chose it over many other languages that aren't centered on classes.