A few days ago, David Heinemeier Hansson announced that Turbo 8 is dropping TypeScript . I'm okay with that because I don't even know what Turbo 8 is. However, over the past few years, some frontend programmers have tried to sell me the idea that "TypeScript is useless, just use tests". I think people with such opinions either don't care about code quality or simply don't know what TypeScript is. Here, I will explain why you should use TypeScript.

I don’t even know what Turbo 8 is

Maybe you should find out?

The idea behind Turbo is your server sends HTML/CSS to the client, and when the content needs to be updated… the server simply sends new HTML which Turbo will inject into the page. You can also annotate links so they fetch new content from the server instead of navigating to a new URL.

Your server side code can be written in whatever language you prefer… Turbo being a 37Signals project I assume they’re using Ruby. It’d work fine with TypeScript too if that’s your thing. Turbo just uses HTTP / JSON to talk to the server and doesn’t have a server side component.

You can have client side code, but AFAIK there’s pretty minimal interaction with Turbo - you might for example add an event listener that processes the HTML and as converts ISO date/times into Date.toLocaleString().

If you’re writing complex client side code then you shouldn’t be using Turbo at all.

This change doesn’t affect, at all, the language used by users of Turbo. What’s changed is the Turbo dev team themselves have chosen to write Turbo in vanilla javascript. And there are advantages to vanilla JS - it removes the compilation step from one language to another, for example.

Fushuan [he/him]
link
fedilink
English
11Y

And there are advantages to vanilla JS - it removes the compilation step from one language to another

IDK about the potency of the pc they used to compile but… it takes less than 10 seconds usually, booting up the testing server with the updated code though CI/CD takes much longer. it’s not abouthte compilation step, that’s a non-issue, it’s about the extra effort they don’t want to put to do the typing.

Create a post

All things programming and coding related. Subcommunity of Technology.


This community’s icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

  • 1 user online
  • 2 users / day
  • 2 users / week
  • 8 users / month
  • 98 users / 6 months
  • 1 subscriber
  • 302 Posts
  • 2.15K Comments
  • Modlog