Hacker News new | ask | show | jobs
by pjmlp 68 days ago
Yet, C# creator gets to chose Go for Typescript rewrite, CoPilot runtime rewrite to Rust apparently was driven by the same Stephen Toub from .NET fame.

Apparently in both cases one of the reasons was Native AOT wasn't up for the job, which would have been good use cases to prioritise which tickets to care about.

1 comments

Because the TypeScript runtime is not a web app? What part of my statement did not connect?

Likewise, the reason for the Copilot SDK to move to Rust is that it compiles to native binaries with no runtime and the FFI can interface with all of the supported SDK languages cleanly. Don't just read the headline; ready the actual post as well.

    > ...Porting that runtime layer to 100% Rust, resulting in a pure native binary exposing a C ABI for in-process consumption by all the language front-ends 
C# AOT is relatively nascent and not yet propagated through all of the ecosystem and thus is not a great choice for scenarios where the goal is a native binary with no runtime. Hejlsberg also cited the same reason for the TypeScript runtime. IMO, this is not C#'s strong point and sweet spot; sweet spot is web API backends.

Read my assertion carefully: web APIs are C#'s sweet spot. CLI apps, multi-platform SDKs -- makes total sense to use Rust.

C# AOT exists in various forms since .NET 1.0, starting with NGEN, Native AOT is only the very last implementation from a series of attempts.

Here is a .NET example of writing node.js extensions in C#, from Microsoft themselves.

"Writing Node.js addons with .NET Native AOT"

https://devblogs.microsoft.com/dotnet/writing-nodejs-addons-...

When .NET team complains about lack of adoption in podcasts, they could start with their own former team members.

Sure it has existed, but it's lack of maturity was explicitly cited by Anders as a gap.
Which probably would have been a priority 1 ticket instead in the Steve Balmer Microsoft days.