logoalt Hacker News

com2kidtoday at 6:14 AM1 replyview on HN

There are benefits to having the same type system throughout a code base. Also Typescript is a really nice language.

The other issue is, many websites are basically apps. The HTML is a byproduct, it isn't the main event. The template based systems are fine if you have mostly plain HTML with some interactivity sprinkled in, but for people who are building complex web apps, there is typically a tiny bit of HTML and a lot of logic.

The old template based systems fall to pieces for really complicated sites.

In regards to language, if you are going to pick a JITed or interpreted language, may as well pick one that has had a lot of effort put into making it fast, and the JS runtimes are really optimized by now. Java is faster, but Typescript is a much better language (and more type safe!) than Java.


Replies

mb2100today at 2:31 PM

Agree that TypeScript is nice, especially for sharing templates and types between server and client. But you can still use TypeScript on the server without sending it all to the client, and without a complex and insecure protocol like RSC. I’m working on making this as simple and dependency-free as possible: https://mastrojs.github.io