Comment by CharlieDigital
Comment by CharlieDigital 11 days ago
TypeScript is not "real" static typing in the same sense as Go, Rust, C#; the type information disappears the moment you build it.
function fn(x: string) {}
Will happily accept: fn(2)
At runtime (and thus the need for schema validators like Zod, Valibot, et al because dev-land "static typing" is a façade) > Rich and the rest of the Svelte team are still using typscript
To be clear, they are not "using" TypeScript, it's more accurate to say they are providing TypeScript bindings.Their codebase (as in the actual code they are writing) is undoubtedly JS[0] with `.d.ts` bindings for TypeScript[1]. Author can also do the same and provide TS bindings at any point in the future.
[0] https://github.com/sveltejs/svelte/blob/main/packages/svelte...
[1] https://github.com/sveltejs/svelte/blob/main/packages/svelte...
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.