Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust is fine.

The worst is TypeScript and Node.js.

A lot of startups are making their code bases in TypeScript. And it is an unbearable mess.

I recently consulted with a company where I rewrote their app in Rails. And now it's much simpler, much better, much more extensible, and far more enjoyable for the developers to work on it.



As a Rust dev it feels like I can't rely on the Typescript compiler at all. If you don't spell everything out for it, it might silently fail to infer the type of a variable and suddenly the function returns a number array instead of a string and the compiler will be just fine with it. Not to mention runtime still has all the problems of JS.


>[...] suddenly the function returns a number array instead of a string and the compiler will be just fine with it.

The type checker is quite forgiving, but that does not sound like something it would just be fine with?

The TS type system is not sound which has obvious tradeoffs. I prefer it over Rust for most things because Rust feels like a Comic-book-guy type person looking over my shoulder going "Akshually, you didn't tell me what the lifetime of this string is", even if it is trivially obvious. I acknowledge that there are situations where that is very valuable but in my opinion it's not generally superior.


Are there persistent ways in which you think Typescript codebases end up a mess?

Developers have to invent too much themselves vs Rails? Something deeper?


There are many different ways how they make the code bases a mess but one very common way that I can pick out is a lot of indirection that is a lot of functions wrapping other functions which wrap other functions and so on where to change even one thing you need to visit and touch 40 different files.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact