Ruby on Rails creator David Heinemeier Hansson has removed TypeScript from the forthcoming version 8 of the Turbo framework, saying he has “never been a fan,” but many Turbo users have protested that the decision was rushed and the change is unwelcome.
A comment on the GitHub pull request that removes TypeScript states that this “is a step back, for both library users and contributors.” This comment has – at the time of writing – 357 likes and just 8 downvotes, suggesting wide support.
Turbo is a framework for delivering HTML pages intended to “dramatically reduce the amount of custom JavaScript,” and is sponsored by Hannson’s company 37signals, whose products include the Basecamp project management platform and the Hey messaging system. Turbo is the engine of Hotwire, short for “HTML over the wire,” because it prefers sending HTML itself rather than JSON data and JavaScript code.
Although Turbo itself is not among the most popular frameworks, Ruby on Rails is well-known and used by major web sites including GitHub and Shopify.
Hansson posted that TypeScript “pollutes the code with type gymnastics that add ever so little joy to my development experience, and quite frequently considerable grief. Things that should be easy become hard.”
The community around the open source Turbo project though is for the most part perplexed and disappointed, not only by the change itself, but also by the manner in which it was made.
“Switching back to JS means lots of the Hotwire eco system packages will be broken. All current open PRs are now fully obsolete. Some from my point of view were very good candidates. IDE won’t provide any more autocompletion as they did,” said one user.
Another complained that “making this important change rushed, ignoring ALL (and I mean ALL) of the PR comments…sets a precedent. Is this how Ruby on Rails will be developed as well? On a one man’s whim?”
Hansson’s responded by saying: “all the love and appreciation to contributors who would prefer TypeScript. This is one of those debates where arguments aren’t likely to move anyone’s fundamental position, so I won’t attempt to do that.”
He added that “we write all our client side code at 37signals now in pure JavaScript and the same too with any internal libraries. This is going to bring that in line.”
Microsoft’s Anders Hejlsberg invented TypeScript out of the belief that complex applications were more robust and easier to maintain if written in a strongly typed language. The popularity of TypeScript in the programming community shows that many agree, and some concepts from TypeScript including type annotations are making their way into ECMAScript, the official name of the JavaScript standard. TypeScript compiles to JavaScript, and it is JavaScript that gets executed in the browser or by Node.js, for example, irrespective of the choice made by the developer.