4 ms·
I very much doubt about TS.Net, given the rewrite in Go decision. .NET nowadays has a serious adoption problem, and they should spend more time talking with th
by pjmlp 1y ago
I very much doubt about TS.Net, given the rewrite in Go decision.
.NET nowadays has a serious adoption problem, and they should spend more time talking with their own colleagues at Azure, about their use of Java, Go, Rust.
- reactordev 1y agoI know, so sad, could have been a great opportunity.
- pjmlp 1y agoJust like every CNCF project that Azure contributes to, written in Go or Rust, which could have been great carrots to further .NET's adoption.
- thewebguyd 1y ago> .NET nowadays has a serious adoption problem It's seriously going to make people question the future of the platform. Look at Microsoft's actions, not their words. TS Compiler: Go New TUI Editor: Rust Winget: C++ (this would have been a great candidate for .NET) At least PowerToys is C#. .NET is great, but why isn't it good enough for Microsoft? The company that historically has had such a strong culture of dogfooding.
- reactordev 1y agoThe issue was in the beginning they didn’t think interop with C/C++ was value add. People complained and they added “Managed C++” which unfortunately influenced C++03’s design a lot. It wasn’t until C++11 that Microsoft gave up. You couldn’t effectively interop with C++ without writing a managed C++ wrapper, which only worked on windows. They added support for P/Invoke to aid in Win32 calls (shell.dll, user32.dll) as a simple fix and we went nuts for it. Wrote wrappers using P/Invoke and a config map nightmare of which dll’s, or dylib’s, or so’s, you needed to get the form to show. Fast forward to today… Rust can interop with C natively. Go can as well, though you’re bringing your luggage with you with CGO. .Net hasn’t ever really had that kind of focus. For one, IL, two, Microsoft saw the platform as a cash cow, three, ecosystem lock in allowed a thriving “MVP” contractor community.
- lowleveldesign 1y agoInterestingly, the Rust windows crate is generated from an MSIL assembly. And same metadata might be used to generate C# bindings thanks to cswin32 [1] project. The meta-assembly generation (Win32 metadata project) is based on clangsharp and it's fairly straightforward to generate interop code for native Windows libraries. Some time ago I described this process on my blog for the detours library [2] [1] https://github.com/microsoft/CsWin32 https://github.com/microsoft/CsWin32 [2] https://lowleveldesign.org/2023/11/23/generating-c-bindings-for-native-windows-libraries/ https://lowleveldesign.org/2023/11/23/generating-c-bindings-...
- reactordev 1y agoThe point is why is another language generating anything for C#?
- contextfree 1y agoYes, and this approach is an extension of the one taken with WinRT metadata which is also ".NET assembly" based.
- pjmlp 1y agoYou are jumping over a few facts there. P/Invoke was born as J/Direct on J++, it became P/Invoke after the lawsuit, and Cool project turned into C#. Managed C++ Extensions in .NET 1.0 got replaced by C++/CLI on .NET 2.0, it was a .NET Core 3.1 milestone to support it, and has recently been updated up to C++20, minus modules. Still heavily used among .NET community on Windows. Meanwhile the native C++/CX and C++/WinRT, both failed their adoption efforts.
- contextfree 1y agoWindows and Office never adopted .NET for client code in the first place except for the Longhorn period in the mid-00s, which burned them and put them off it. If that didn't stop .NET in the two decades between then and now, I'm not sure why it would today. Actually, Windows is just now starting to adopt C# now that AOT is supported (I think the new native Copilot app is C#).
- Kwpolska 1y agoMany Windows Server admin tools (such as Server Manager or Virtual Machine Connection) and MMC snap-ins (e.g. Event Viewer, Hyper-V Manager) are written in .NET Framework 4. PowerShell is .NET Framework 4. Everyone’s favorite bloated IDE (Visual Studio) is .NET Framework 4 as well. In the Office land, Excel’s Power Query is .NET Framework 4. Adopting the modern .NET is probably harder due to its lifecycle.
- reactordev 1y agoOMG could you imagine writing MMC snap-ins using some sort of plugin declspec import bs in C++? .Net and reflection with Assembly.Load saves so much time and effort to build modular “ship it now, deliver features later, extend it if we fall behind” apps. Not that those are good things, it just means you can defer until your MS PM gets the budget to fill those backfill positions that have been open for 12 months because the hiring bar is astrophysics
- pjmlp 1y agoI can, because due to Windows team love for COM and C++, many extension points require doing exactly that. Want to extend the context menu actions, or add new thumbnail capabilities for a recent file format? It is exactly that. Even with WinRT Runtime Components, they were doing in a way that some APIs were only surfaced when using the components from C++. Quite a different approach from OS / language teams at Apple and Google, where productivity with better languages has a priority no matter what.
- pjmlp 1y ago
- adabyron 1y agoAnders Hejlsberg, a main architect on C# & TS, stated somewhere that they re-wrote the TS Compiler in Go because the syntax was the closest to how it was originally written and allowed re-writing to be easiest. He has a great write up of it somewhere on GitHub. Microsoft is an insanely huge company. There teams seem to be able to use whatever works best for the project/team. The old XKCD comic of org charts in big tech shows Microsoft as a bunch of people aiming guns at each other for a reason. They'll have 5 teams making 5 competing products sometimes. That's the culture I'm aware of. I'm not aware of the dogfooding culture you are suggesting.
- pjmlp 1y agoYeah, and then at BUILD 2025 session, he ended up explaining how they had to rewrite all the data structures, due to the less capable type system from Go versus Typescript. So the gain isn't as much as what is being sold. Meanwhile Azure has no issues using AI based translation to port C++ projects into Rust, which they could have done in a similar way to port into C#. Also, Go has a less capable tooling as C# for WebAssembly, due to Blazor efforts, the team has invested quite a lot into it. It remains questionable what will they do for the in browser playgrounds and editors use cases.
- reactordev 1y agoExactly. They chose Golang because they wanted to, not because of any technical limitation. Could have been C#, or Rust…
- zeroc8 1y agoThey used Go because it was the best fit for the task. Anders explained the reasons very well.
- 9cb14c1ec0 1y agoNot sure I agree on the adoption problem. A few medium sized client projects are nothing compared to the massive internal .NET codebases Microsoft has that run some of their largest services.
- pjmlp 1y ago.NET team members have acknowledged this on podcast interviews, .NET Rocks, Nick Chapsas, The Unhadled Exception, among possibly others.
- cogman10 1y agoI blame historic microsoft for their anti-oss stance. It kneecapped the .net ecosystem for over a decade and created an attitude of "if it isn't in .NET, I won't use it".
- reactordev 1y agoI agree as well. The hostile attitude towards OSS under Ballmer led to this. Nadella had the correct approach and a year later, started repairing those bridges, joining the Linux Foundation.
- pjmlp 1y agoMany things under Satya also feel like good old Microsoft, like lack of GUI frameworks for GNU/Linux, killing VS4Mac after the rewrite, dotnet watch drama, profiling tools being VS only,...
- runevault 1y agoMAUI not supporting Linux feels like such a huge whiff. It is clearly possible to get at least decent cross platform support that includes linux in .net considering Avalonia exists.
- nic547 1y agoMAUI is supposed to use native ui components, AvaloniaUI just uses Skia. I think going with a non-native approach would kinda make Linux a clear second class platform, especially with all the native features that need to be rebuilt? Is there any multiplatform ui framework that's actually "native" for all the different linux ui toolkits?
- reactordev 1y agoVS4Mac deserved to die, that was Mono Code aka Xamarin and it was terrible. No offense to Miguel, mono is amazing, but the IDE they made was horrid. Microsoft was asleep at the wheel the last decade of Ballmer, leaning too heavily on their Xbox Studios and Enterprise Cloud to care about desktops. They gladly let Mac take office share as “no enterprise software developer would ever choose a Mac”. Those famous Mac vs PC ads. The GUI development story has plagued us for a long time. No one wants to take on the challenge of a unified user interface spec. Why? Because it will always be wrong - ever changing - and a giant suck of corporate resources. It’s better to let each team think of their own way of doing things. Then, they can choose the best of them and release them as frameworks (WPF) only to be abandoned by the next regime change. MAUI, UWA, Metro, WPF, all an attempt to save what effort they have made. Ultimately, everyone loves their Electron apps, so HTML has become to new UI paradigm. They move too slowly. Convinced “they know better than you” and will spend the next 5 years hyping up the next XML abomination.
- mathverse 1y agoI would not touch C# unless you are already using it. Microsoft proves over and over it cannot be trusted in what they say. Watch what they do: - basically dont use ant UI framework they say is the future and they are not using themselves - be vary of the future of some of it stuff like C#
- reactordev 1y agoOh I learned this the hard way. Managed DirectX, XNA, Creators Club, Windows Store, shared profit motive, fair business practices, Project Natal/Kinect, Azure, and finally… .Net. Yup, Microsoft loves developers… loves their subscriptions.
- deleted 1y ago[deleted]
- adabyron 1y agoC# has been around a long enough time and Microsoft's teams over that time have done a pretty good job making upgrading each version easy. As long as the current leadership in the C# & .NET teams remain, it's a very safe language and framework to use. They also deserve huge kudos to API & performance improvements the past decade since moving on from .NET Framework 4.x, which still runs fine. They also have a lot of internal & external users using it.