Hacker News new | past | comments | ask | show | jobs | submit login

> some sort of "TypeScript-ish" language that, if a TS programmer plays by a stricter set of rules

This is basically just rust, no? As a TS developer, I've found picking up rust to be really neat.




No. :-)

That was certainly the promise/hype of Rust ~2-3 years ago, that it was going to become so ergonomic that even "boring line-of-business applications" (i.e. JS backends) could be written in Rust, by everyday programmers, without any slow down in delivery/velocity due to the language complexity.

But, from what I've seen, that's not played out, and instead the community is still on the look out for the killer "systems-language performance, but scripting-language ergonomics" language.


Try C# instead.


I write a fair bit of C#. It feels like the prequal to Typescript. Its lack of discriminated unions and type narrowing feels like a step back from Typescript.


Given that TypeScript is driven in late part by one of the main long term (until they moved to TS) C# language designers, I feel a lot of the core of the TS type system is what they wanted to do in C# but for legacy reasons just can’t.


DU is available in C# via packages like OneOf and Dunet.

Dunet is really good.

https://github.com/mcintyre321/OneOf

https://github.com/domn1995/dunet

It's on the roadmap and will arrive at some point:

https://github.com/dotnet/csharplang/blob/main/proposals/dis...




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

Search: