Hacker News new | ask | show | jobs
by hu3 300 days ago
How is Go structurally similar to TypeScript?

It doesn't even have advanced generics like TypeScript, nor union types. No classes and no heritance either.

Unless you have a source, I'd say that's a very debatable speculation.

My guess is they chose Go for the same reason most users do: it's good enough, easy to grasp, has a decent std lib and is easy to grasp.

2 comments

https://www.youtube.com/watch?v=10qowKUW82U

Around the 13 minute mark, Anders goes into it. IIRC, the big things were the GC and them both supporting cyclic data structures.

Makes sense. Cyclic data with Rust is not trivial, to put it mildly. And GC does make things much easier.
GC vs no GC will impact your code structure more than anything else.