7 ms·
Even though I have my considerations regarding Go, I love that they picked Go instead of the fashion to go Rust that seems to be the norm now. A compiled manag
by pjmlp 2y ago
Even though I have my considerations regarding Go, I love that they picked Go instead of the fashion to go Rust that seems to be the norm now.
A compiled managed language is much better approach for userspace applications.
Pity that they didn't go with AOT compiled .NET, though.
- pjc50 2y ago> Pity that they didn't go with AOT compiled .NET, though. Yeah. It seems to be unfashionable somewhat even within Microsoft. (edit: it seems to be you and me and barely anyone else on HN advocating for C#)
- atonse 2y agoThis was also surprising to me – C# is a really awesome and modern language. I happened to be doing a lot of C# and .NET dev when all this transition was happening, and it was very cool to be able to run .NET in Linux. C# is a powerful language with great and constantly evolving ideas in it. But then all the stuff between the runtimes, API surfaces, Core vs Framework, etc all got extremely confusing and off-putting. It was necessary to bring all these ecosystems together, but I wonder if that kept people away for a bit? Not sure.
- pjmlp 2y agoAll Azure contributions to CNCF are using a mix of Go and Rust, mostly. Here is a kind of weird, given the team.
- nwah1 2y agoAlso, this is surprising because this was presented and led by Anders Hejlsberg, who is the creator of both C# and Typescript. If anyone should have picked C# it would be him.
- dagw 2y agoHejlsberg seemed quite negative when it came to cross platform AOT compiled C# in several comments he's made, hinting at problems with both performance and maturity on certain platforms.
- zigzag312 2y agoProjects like this are needed to improve C#'s cross platform AOT. Missed opportunity IMO.
- ryanjshaw 2y agoAbsolutely. Go is where it is because of the parent org's commitment to dogfooding it; strange that Microsoft is wasting this opportunity AND sending a negative message to .NET devs.
- Cthulhu_ 2y agoSure, but this team's focus is on Typescript, not C# / cross-platform AOT; there's only so much time in a day. Others can pick it up I'm sure. But I think it's also an indication that Typescript may be bigger and more important for Microsoft than C#/.NET is at this time. It's definitely much more used than C# is according to this non-representative survey of Stack Overflow (https://survey.stackoverflow.co/2024/technology https://survey.stackoverflow.co/2024/technology).
- Cthulhu_ 2y agoAt the same time, if anyone can make a language choice, it's him - the fact he didn't pick his own language is high praise for both himself and his neutrality, and the Go language.
- Chyzwar 2y agoI think the main thing is that they are porting, not re-writing. Current tsc is functional by nature and that's makes go better fit.
- xanth 2y agoI think the much larger ask C# couldn't answer is the "expressive" access to low level struct layout[1] [1] https://www.youtube.com/watch?v=10qowKUW82U&t=769s https://www.youtube.com/watch?v=10qowKUW82U&t=769s
- jjice 2y agoIf I recall in an article from a while back, the idea was originally rust, but the current compiler design had lots of references shared references that would make the port to rust a lot of work.
- pjmlp 2y agoPersonally, Rust only makes sense in scenarios that automatic memory management of any kind is either unwanted, or it is a quixotic battle making the target group think otherwise. OS kernels, firmware, GPGPU,.... If it is the ML inspired type system, there are plenty of options among compiled managed languages, true Go isn't really on that camp, but whatever.
- jjice 2y agoI'd love a language that is a GC'd like go, but with the ML inspired type system, and still an imperative language. OCaml seems to be the closest thing to Rust in that regard, but it's not imperative.
- pjmlp 2y agoOCaml has if/else, for loops, whiles, mutations, what are you missing? There are also Swift, F# (Native AOT), Scala (Native, GraalVM, OpenJ9).
- elcritch 2y agoNim is pretty close to that for me. It’s more pascal-ish inherited but has a sophisticated type system including case types similar to ML sum types and compile time.
- dontlaugh 2y agoThat language is Swift.
- cheepin 2y agoRust memory management is automatic. Object destructors run when the object exits scope without needing explicit management by the programmer
- tinco 2y agoIt's not just a pity, it's very surprising. In my eyes Go is a direct competitor of C#. Whenever you pick Go for a project, C# should have been a serious consideration. Hejlsberg designed C# and that a team that he's an authority figure in would opt to use Go, a language which frankly I would not consider to build a compiler in is astounding. Not saying that in a judgemental way, I'm just genuinely surprised. What does this say about what Hejlsberg thinks of C# at the moment? I would assume one reason they don't pick C# is because it's deeply unpopular in the open source world. If Microsoft was so successful in making Typescript popular for open source work, why can't they do it for C#? I have not opted to use C# for anything significant in the past decade or so. I am not 100% sure why, but there's always been something I'd rather use. Whether that's Go, Rust, Ruby or Haskell. I always enjoyed working in C#, I think it's a well designed and powerful language even if it never made the top of my list recently. I never considered that there might be something so fundamentally wrong with it that not even Hejlsberg himself would use it to build a Typescript compiler. What's wrong with C#?
- dimgl 2y agoC# needs an interpreter (.NET runtime) while Go compiles down to a binary. And the toolchain allows you to compile for other architectures fairly easily. So that could be a fundamental reason why.
- rat9988 2y agoThe grand parent was talking about AOT.
- deleted 2y ago[deleted]
- bitwize 2y ago.NET has AOT compilation now. There really is no excuse, especially when you consider that C# has a pretty decent type system and Go has an ad-hoc, informally specified, bug-ridden, slow implementation of half of a decent type system.
- agumonkey 2y agoI was asking myself the same questions. ah, answers below: https://news.ycombinator.com/item?id=43333296 https://news.ycombinator.com/item?id=43333296
- rat9988 2y ago>Pity that they didn't go with AOT compiled .NET, though. I was trying ot push .net as our possible language for somehow high performance executables. Seeing this means I'll stop trying to advocate for it. If even this team doesn't believe in it.
- criddell 2y agoThat makes sense if your project has similar constraints and requirements. I like when Microsoft doesn't pretend that their technologies are the right answer for every problem.
- surajrmal 2y agoThey cited code style and porting as reasons to use go over c#, not performance.
- rat9988 2y agoI didn't say it was very performance critical, go and c# are both good enough for us in this regard. The problem is that, when evaluating the whole thing, they decided against c#, that is problematic here.
- nipah 2y agoBut they not stated it is <because> of C#'s performance, so I don't think this is THAT problematic. But I agree that it would be fine to see them dogfeeding on their language for such a massive project, and a project that is even related to TypeScript (as it inspired it in some features), it is a shame they don't do it, but it is also the case for many of their projects (like, they are even pushing react native for apps nowadays), so I think at some level it's really fine.
- rat9988 2y ago> But they not stated it is <because> of C#'s performance But I just said my point is not about performance at all! It is about the whole package. Performance of c# and go are both enough for my usecase, same for java and c obviously. They just told us that they don't think the whole package makes sense, and disowned the AOT compilation.
- bichiliad 2y agoThere are some external projects that have tried to port tsc to native. stc[0], for instance, was one. Iirc it started out in Go since it had a more comparable type system (they both use duck typing) making it easier to do one-to-one conversions of code from one language to the other. I’m not totally sure why it ended up pivoting to rust. [0]: https://github.com/dudykr/stc https://github.com/dudykr/stc
- nightpool 2y agoHejlsberg discusses the decision not to use C# here: https://www.youtube.com/watch?v=10qowKUW82U&t=1154s https://www.youtube.com/watch?v=10qowKUW82U&t=1154s
- ninkendo 2y ago> I love that they picked Go instead of the fashion to go Rust This seems super petty to me. Like, if at the end of the day you get a binary that works on your OS and doesn’t require a runtime, why should you “love” that they picked one language over another? It’s exactly the same outcome for you as a user. I mean, if you wanted to contribute to the project and you knew go better than rust, that would make sense. But sounds like you just don’t like rust because of… reasons, and you’re just glad to see rust “fail” for their use case.
- timewizard 2y ago> that seems to be the norm now. According to whom?