Johan wrote this
@ 2023-09-07

More like Hypescript amirite

DHH is in the tech news again! It’s a stunt. It usually is, with him. And here I am, shamefully but eagerly taking the bait.

So if you don’t know who he is, let’s have a little recap: DHH is David Heinemeier Hansson, a Danish-American programmer best known for creating the Ruby on Rails web framework and having opinions online. He’s had a rough couple of years, culminating in the walkout of his company and a very public and dramatic heel turn towards predictable rich-guy gripes like “we should use cryptocurrency because freedom” and “why are we letting brown people go to university.” (For the record: I don’t think DHH is a racist or a white supremacist or whatever people have called him, he’s just incredibly wealthy and thus a tragicomic believer in meritocracy — the world amply rewarded his ineffable greatness after all, which proves we live in a just society and nobody needs those stupid diversity favors, QED)

But the thing about DHH is that he mixes these Objectively Bad opinions with some pretty good ones, and I will freely but grudgingly admit that he often shows great instincts when it comes to API design. I truly believe that working in Ruby on Rails for a project or two would open many people’s eyes to just how exhilaratingly free it’s possible to feel as a modern web developer. The tools of our job will force us to suffer far too many cuts and bruises and indignities, and if we suffer them for long enough they become invisible to us. I’m thankful that Rails exists, and even more thankful for the fact that it has stayed the course of expressiveness and happiness this last decade while everyone else was off massaging their Babel configuration and thrashing the DOM. The maintainers have my eternal gratitude for that. But with DHH these days, it’s hard to know what’s a play for publicity, an ego trip, a vendetta, or a genuinely good idea. This morning I woke up to the news that he unilaterally yanked TypeScript from Turbo 8. The Internet lit up like an indignant christmas tree, lashing out in near-unanimous fury.

Of course, DHH went about it in typical fashion: dude just wrote a blog post and merged a pull request. Wham! Done. Probably not a great way to foster community? But as a simple consumer of the library, it’ll probably be transparent to me and over time, might even result in more contributors because there’s a large majority of developers out there who — shock horror! — have never actually used TypeScript. That’ll shake out one way or another. I don’t feel like I have a horse in that particular race.

So many true Scotsmen

No, what interests me the most is the response from all those vocal thought-leader types. It feels emblematic of the JS ecosystem at large. Read the comments on the pull request (which I will hazard are mostly drive-by opinions from people who have never contributed to the codebase, and in many cases don’t even use Turbo) and then go read the Orange Site if you must, but the gist of it is this: if you’re not a fan of TypeScript, you’re sitting there all day WRITING BUGS and you need to fucking GIT GUD.

a very bad GitHub issue

Not enjoying the type system? Feel like it gets in the way and makes your code harder to read? That’s because you suck and you need to learn how to properly design your application. I WILL HAVE YOU KNOW I HAVE WORKED AT GOOGLE and I can confidently and authoritatively state that it’s impossible to maintain an application without IntelliSense and static analysis! Vanilla JavaScript turns into a hot mess of undefined is not a function exceptions within days and you’re a rock-banging savage for even entertaining the idea!

Well, strap me in an animal hide and give me a club, because it turns out the static vs dynamic typing debate is evergreen, and I mean that in the absolute dullest sense of the word: the discussion inevitably never involves anything other than anecdotes broken into their two constituent parts prior experience and personal taste. Some people are used to writing stone-cold procedural code with while loops and elseifs and feel like ceremony and strict guardrails are not only necessary but should be celebrated because they’ve worked in a big, sprawling Microsoft stack with fifteen colleagues and somehow Scott would always find some novel way to accidentally multiply a string with a number. They feel naked without their type checking. And that’s valid! Just as valid as working in a dynamic language (although we won’t know that’s valid until runtime, lololol). But if you were to read the Internet today, you’d be forgiven for thinking nothing serious has ever been written or indeed will ever be written without VSCode autocompletion and the interface keyword. Even with millions of sites out there proving that not only can it be done, it can be pleasant and enjoyable and every bit as bug-free as statically typed code. It all depends on who is writing it and what the environment around them looks like. (You gotta have a test suite, though.)

Look, I’m noticing myself already dipping my toe into that blighted debate and I promise not to go any further, but I really wish the Internet at large would eventually learn that lesson, too. There is no superiority there, only personal preference and experience, and if you try to argue otherwise you should probably step back and think about what you’re trying to accomplish. TypeScript might be your idea of a good time but it’s not everyone’s, and every bit of research into static vs dynamic typing thus far has ended up the same way, with no discernible difference in code quality metrics. Let DHH nuke his community if he wants, if the language brings him joy. Take a deep breath and let him continue on his pitiful trajectory towards middle-aged conservative blowhard. At least he hasn’t bought any social media platforms yet.