logoalt Hacker News

tossandthrow04/01/20251 replyview on HN

And this is definitely a problem.

Had I had the opportunity to choose a language across the entire stack with mature wide adopted frameworks and libraries, I had done it.

Had there been something line Rust, Go, Java, C#, etc. that would work end to end, that would have been amazing.

In practice, even the weak safety typescript provides catches so many bugs before they hit production that it is indeed worth it - I have more than 140k LOCs of Typescript in production, and that would not be manageable without types.


Replies

CharlieDigital04/01/2025

    >  I have more than 140k LOCs of Typescript in production, and that would not be manageable without types
The Svelte team achieved it with JSDoc. Google's JS style guide also focuses on JSDoc for the same reasons[0].

And to be just a tad pedantic: you have JS in production; your TS is only in dev.

    > Go, Java, C#, etc. that would work end to end, that would have been amazing.
It's not that you can't; it's that you choose not to (and yes, generally for good and valid reasons). There are end-to-end solutions for C# (e.g. Blazor), for example, that are perfectly fine depending on your use case (not great for all use cases). Fable is another example using F#[1]

There are also libraries like Bootsharp[2] that are doing interesting things, IMO, and has some of the same energy as OP's project (moving the typing and logic into a runtime that supports runtime static types and interfacing minimally with JS)

[0] https://google.github.io/styleguide/jsguide.html#jsdoc

[1] https://fable.io/docs/

[2] https://sharp.elringus.com/

show 3 replies