I’m sure there’s a way to write factorial more succinctly. After all, there isn’t that much difference between Smalltalk and JavaScript in terms of capability. Smalltalk also has first-class functions and closures. There is nothing that JavaScript can do that Smalltalk can’t.

In fact, Smalltalk is an incredibly elegant language. Read Elegant Pharo Code.

Moreover — and you already know how I feel about JavaScript — JavaScript is a wretched programming language. It’s plagued by numerous WATs and WTFs that have made it the butt of jokes for years. Instead of fixing these problems, ECMA TC39 have chosen to pile on new features like there’s no tomorrow, bloating the language to an unbelievable level. The latest incarnation, ES8.0, has a language spec of over 885 pages!

You can ameliorate some of these problems by enabling strict mode and using linters and following best practices as dictated by Douglas Crockford and others. But I’m astonished that you need to jump through so many hoops just to do JavaScript programming right.

Smalltalk programming is as easy as falling off a log. It was originally used to teach programming to children! Smalltalk presents virtually no cognitive friction. You sure as hell can’t say that about JavaScript.

It never fails to amaze me that there are so many JavaScript fans. The only reason I can imagine for this is the Stockholm syndrome.

By the way, my code snippet wasn’t intended to show how elegant Smalltalk is. It was intended to illustrate Smalltalk syntax, which is apparent in the subsequent paragraphs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store