7 ms·
.NET was the most sane programming ecosystem that I worked in. Great CLI, great package manager, very good stdlib, strong IDEs/Debuggers, etc. but sadly inter
by tester756 1y ago
.NET was the most sane programming ecosystem that I worked in.
Great CLI, great package manager, very good stdlib, strong IDEs/Debuggers, etc.
but sadly interesting jobs like OSes, databases and compilers are way less common than in C++ world :(
- reactordev 1y agoI agree. The stability comes from its ecosystem though. Enterprise Software. Where things like meticulous use of Omit and Task are common place and really REALLY bad things happen if you fuck up. But besides that, there’s a healthy gamedev community that embraced C# early and have been using it ever since. There’s C++ MFC guys that got duped into WPF and have been supporting it ever since. Winforms devs that are still trying to make a dark mode. I’ve even seen community grass roots “I need this in Silverlight” projects take hold and become one of the largest SDKs in the world. It’s cool. It’s fun. And with AOT, it’s everywhere. C# is like that cool uncle of your Father (Java) that likes to party all night but still holds a job. Maybe someday TS.Net will exist and we’ll all be singing “Back in my day”
- pjmlp 1y agoI 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 ago
- 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.
- rictic 1y agoWhat's Omit refer to in this context?
- reactordev 1y agoThe 14,000~ instances of T? or _
- pjmlp 1y agoOn my little enterprise bubble, the only place remaining for C and C++ is writing native libraries to be consumed by managed languages, or bindings. The last time I wrote pure C++ applications at work, was in 2005. Libraries still regularly.
- Const-me 1y agoFor the last few years, I’ve been developing CAM/CAE software on my job, sometimes embedded Linux. Same experience: last time I developed software written entirely in C++ was in 2008. Nowadays, only using C++ for DLLs consumed by C#, for 2 reasons: manually vectorized SIMD for CPU bound numerical stuff, and consuming C or C++ libraries like GPU APIs, MS Media Foundation, or Eigen.
- jiggawatts 1y agoSometimes I feel like there ought to be a Hacker News like forum for us dinosaurs stuck in the Enterprise tarpit. Instead of talking about Elixir and AWS startup credits, we’d complain about the weather and legacy CORBA components.
- pjmlp 1y agoIndeed, it could be interesting. What do you mean by CORBA, isn't that the cool new shiny WebAssembly components? :)
- rafaelmn 1y agoSince you mention great CLI - is there a CLI tool that is free/cross platform that works like prettier ? I found https://csharpier.com/ https://csharpier.com/ but have never heard of anyone using it. Also not sure how it works with linters like roslynator or stylecop ? This is something I miss very much when coming back from TS, other languages also have better formatters. C# is very tied to editors/IDEs which is a nightmare in teams where some people use vs/vs code/rider
- Cu3PO42 1y agodotnet format [0] exists and is maintained by the .NET team. It is different from Prettier in that it is much more configurable, but it gets the job done for us. It does integrate language services and can automatically apply code fixes for custom analyzers. I have not explicitly tried roslynator or stylecop, but I suspect this would work as expected. [0] https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-format https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-f...
- rafaelmn 1y ago> It is different from Prettier in that it is much more configurable I only tried it briefly but found it was waaay to lenient with the amount of variance in style it left unchanged (eg line breaks for function parameters) - can it get configured to produce consistent formatting like prettier ?
- Cu3PO42 1y agoIt can be configured to be much more aggressive with formatting, but I'm not certain if you can force it to produce the exact same output for any possible whitespace in the input.
- eterm 1y agoI think there are also a lot of default rules which aren't enforced until they're bumped up in severity in the .editorconfig. Also it can hook into roslyn analyzers, so if you want a more opinionated analyzer then stylecop analyzers ( https://github.com/DotNetAnalyzers/StyleCopAnalyzers https://github.com/DotNetAnalyzers/StyleCopAnalyzers) would be an option, although I haven't used it myself for a long time.
- deleted 1y ago[deleted]
- atombender 1y agoDo you know about any sizeable open source projects written in C#, other than what Microsoft has produced? I rarely come across anything written in it.
- whoamii 1y agoUnity?
- atombender 1y agoIs Unity open source?
- 369548684892826 1y agoJellyfin / Emby A lot of the *arr tools like Sonarr Bitwarden and Keepass
- majora2007 1y agoKavita (self hosting for books/comics)
- Alupis 1y agoIt's a curious thing, the .NET ecosystem. The overwhelming majority of it's ecosystem seems to be dominated by Microsoft first-party libraries and frameworks. 3rd party libraries and frameworks seem to either get swallowed up by Microsoft, killed, or never reach critical-mass. Often in the .NET ecosystem, it seems there is exactly one library or framework for thing $X or $Y. Whereas in the JVM ecosystem, you have 30+ logging libraries, 87 different MVC frameworks, etc. (yes, I'm being a bit facetious, but you get the point). I imagine .NET developers often think this is a good thing, in regard to their ecosystem. No guessing what to use, just go with the "blessed" path and don't think about it. And, to that end, there is some obvious merit to this. However, I feel the .NET ecosystem loses out on cross-pollination of ideas. There's zero possibility Microsoft's employees just happen to make the best frameworks and libraries... there should be many web frameworks - each competing for mindshare and trying to out-innovate each other, each with their own pro's and con's, etc. So, while .NET might be technically open source, it still feels rather like a closed source ecosystem, controlled by a single corporate entity.
- radicalbyte 1y agoI've been using it since 2002 so you can imagine my opinion when jumping to other languages. They've been very good to steal all of the things that worked from other languages and constantly iterate on their core infrastructure and language.
- Ygg2 1y ago> .NET was the most sane programming ecosystem that I worked in. Having written libraries in .Net I fully disagree with that notion. First insanity is figuring out what in the fuck you need to support. .Net framework or .Net standard or .Net Core or Mono (or .Net Duplo or .Net dot nes :P). Second is the Source generators. I swear using t4 templates is the saner option. I've had cached artifacts appearing out of the fucking nowhere like unkillable zombies despite closing the Rider, clearing its cache, and killing build server. Third is the availability of packages. In Rust and Java there are like several libs for anything (even if C bindings).
- wvenable 1y ago> First insanity is figuring out what in the fuck you need to support. Since I no longer support .NET Framework, it's just .NET now. .NET was two platforms for a while and they did a lot of weird stuff to make that work (.NET standard) but it's been one platform for many versions now so that specific difficulty can mostly be ignored.
- Ygg2 1y agoEasy to say, but it poiets to ecosystem fracture. But I've been getting requests to support really weird and outlandish versions. Stuff like Mono and .Net 4.56
- wvenable 1y agoMicrosoft managed a smoother transition than Python 2.x to 3.x. This kind of thing is very difficult. I don't see any reason to support Mono or .NET 4.56 anymore.
- meibo 1y agoMost C# libraries I use are outdated, crappy and do just a little less than what I need. Also, most Rust libraries I try to use are outdated, crappy and do just a little less than what I need. Maybe what I need is niche but my experience is pretty similar in that regard.
- deleted 1y ago
- radicalriddler 1y agoI despise working with Nuget. Whether it's a restore, managing your csproj, or publishing packages, compared to NPM it's an absolute mess.
- pjmlp 1y agoIt is the first time I see anyone praising npm.
- rowanG077 1y agoI liked .NET but the performance was really bad for anything that had even reasonably latency requirements. But this was 15 years ago, so maybe it has improved. I don't remember exactly what I wanted to do but it was something like pumping some event every few milliseconds and it was basically impossible. The jitter was already larger than the interval.
- bob1029 1y agohttps://medium.com/@ocoanet/improving-net-disruptor-performance-part-3-introducing-the-valuedisruptor-5b467730bbe https://medium.com/@ocoanet/improving-net-disruptor-performa...
- perennialmind 1y agoDotnet's GC has a real latency problem. Miguel de Icaza gave a nice talk on why noticeable pauses are inevitable in a stop-the-world tracing GC, proposing Swift's reference-counting GC as the viable alternative [1]. Still, there are recent developments (Satori GC) with the promise to make the worst case far more palatable (e.g. 250ms -> 5ms) [2]. [1] https://www.youtube.com/watch?v=tzt36EGKEZo https://www.youtube.com/watch?v=tzt36EGKEZo [2] https://github.com/dotnet/runtime/discussions/115627#discussioncomment-13162705 https://github.com/dotnet/runtime/discussions/115627#discuss...