3 ms·
Mostly because they didnt consider the AOT compilation mature enough.
by bjoli 2y ago
Mostly because they didnt consider the AOT compilation mature enough.
- int_19h 2y agoActually, the reason why they went with Go rather than C# is because they wanted to port the existing code as much as possible rather than rewriting from scratch. And it turns out that TS is syntactically and semantically much closer to Go, so you can often convert the former to the latter mechanically.
- CharlieDigital 2y ago> And it turns out that TS is syntactically and semantically much closer to Go, so you can often convert the former to the latter mechanically. Are there examples of this? I ask because I've been working on a Nest.js backend in TS and it's remarkably similar to C# .NET Web APIs (controllers, classes, DI). Really curious to see the translation from TS to Go.
- neonsunset 2y agoTSC codebase is quite unlike regular TypeScript code you will see out there. So it is about specific way TSC is written in being the easiest to port to Go rather than the TS language as a whole. There's a screenshot comparing the two side-by-side, IIRC it was showcased on the video of the talk (if someone has a timestamp - please post).
- CharlieDigital 2y agoGot it; thanks for the tip!
- int_19h 2y agoThe TL;DR version is that they don't really use classes and inheritance (which is the part that would be hard to map to Go but easy to map to C#). It's all functions dealing with struct-like objects. The other part of it is that C# is very firmly in the nominal typing camp, while TS is entirely structurally typed. Go can do both.