Comment by tester756
4 days 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 :(
I 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”
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.
> .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.
21 replies →
Not 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.
1 reply →
I 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#
3 replies →
I know, so sad, could have been a great opportunity.
1 reply →
I 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".
7 replies →
What's Omit refer to in this context?
The 14,000~ instances of T? or _
Since you mention great CLI - is there a CLI tool that is free/cross platform that works like prettier ? I found 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
Csharpier is the best option available. I've been using it for 3-4 years now and had success getting it adopted at my last two companies on greenfield projects. It's not exactly an unknown tool - nearly 2k stars on Github. But a lot old school .Net companies just don't seem to have much interest in auto formatters because they've been working without them for a long time.
If you're using csharpier you don't need to use Roslynator formatters. No issue with the analyzers package. The csharpier docs have info on what StyleCop rules need to be adjusted so they can work together. Personally I don't use StyleCop anymore as it seems to be fairly dead, and I don't really feel the need for things like enforcing file layout or naming.
Edit: Also I will add that unless the landscape has changed recently, I believe csharpier is the only C# tool that has deterministic formatting good enough to enforce code formatting checks in CI.
dotnet 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-f...
The problem is that dotnet format is horribly slow. So much so that it's only useful as a precommit hook
> 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 ?
2 replies →
I was not able to use (recent) dotnet-format as standalone .exe tool, also it only worked if inside an actual project with .sln/.slnx file and all that. I could not instruct it to work on single file.
Hi! I use csharpier, it does the job - I included it as a preliminary check in our CI pipeline for a step of merge requests quality assessment. It is the closest tool I found, that ressembles prettier. You should definitely give it a try.
I’ve been using csharpier for almost a year now and it’s amazing. Because it’s opinionated, you don’t have the space to overthink it, you just use it.
Besides, I really like its formatting style.
csharpier is great. It is what "dotnet format" should be.
On 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.
Sometimes 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.
Indeed, it could be interesting.
What do you mean by CORBA, isn't that the cool new shiny WebAssembly components? :)
For 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.
I'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.
I 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.
Dotnet'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
[2] https://github.com/dotnet/runtime/discussions/115627#discuss...
https://medium.com/@ocoanet/improving-net-disruptor-performa...
Do 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.
It'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.
That because that's the environment MS nurtured for over a decade. They were openly hostile to things like nuget up until like 2016 or so.
They purposefully made it painful to venture out of the MS ecosystem.
>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.
Supply chain security is important thing, especially after last years
You go with Microsoft's libraries and you don't have to care that much about some random developer receiving 50k USD for their GH account
There are several logging libraries for .net as well, microsoft even lists them: https://learn.microsoft.com/en-us/dotnet/core/extensions/log...
Libraries getting swallowed up is not so bad as it sounds. For instance for web frameworks there was a phase of experimentation with projects like Nancy that inspired changes for asp.net core. There is still alternatives like fast endpoints.
Also you have things happening like integrated system.text.json replacing newtonsoft.json that over time took on some cruft.
Why would anyone make a .NET open source library when Microsoft is quick to squash anything that is actually useful with their own open source implementation?
Microsoft still has some lessons to learn about fostering an active open source ecosystem -- of course, unless they are intentionally suppressing it in .NET.
It's weird you using logging as there used to be 3/4 different libraries people used (nlog, log4net, elmah, another one I forget?).
Then serilog came out and pretty much everyone switched to that in a very short period.
https://github.com/MonoGame/MonoGame (runs even on consoles, which is rare for open source game frameworks and engines)
https://github.com/SubtitleEdit/subtitleedit
https://github.com/jellyfin/jellyfin
https://github.com/AvaloniaUI/Avalonia
https://github.com/bitwarden/server
https://github.com/unoplatform/uno
https://github.com/files-community/Files
https://github.com/NickeManarin/ScreenToGif
https://github.com/DevToys-app/DevToys
https://github.com/d2phap/ImageGlass
https://github.com/ShareX/ShareX
https://github.com/duplicati/duplicati
https://github.com/OpenRA/OpenRA
https://en.wikipedia.org/wiki/Ryujinx
https://sourceforge.net/projects/keepass/
https://github.com/orchardcms
https://github.com/piranhacms/piranha.core
https://github.com/umbraco/Umbraco-CMS
https://github.com/quozd/awesome-dotnet
The FFXIV extension/mod tool is a fun example.
https://github.com/goatcorp/Dalamud
https://github.com/SM64-TAS-ABC/STROOP
Can't speak for FLOSS, but I've worked on massive projects in various Banking, Govt and eLearning spaces. I've never really hurt for library support via NuGet either. It's honestly not always my first choice, but pays the bills.
I mostly just dislike a lot of the excessive use of "Enterprise Patterns" for projects that don't come close to actually needing them.
Jellyfin / Emby
A lot of the *arr tools like Sonarr
Bitwarden and Keepass
Kavita (self hosting for books/comics)
Ryujinx, a state-of-the-art Switch 1 emulator, was open source and written in C#
Not sure what your definition of sizable is. But if it’s just physical size of repo then my language-ext project [1] is about half a million lines of code, ~7,000 stars, and ~25 million downloads.
We are out there :)
[1] https://github.com/louthy/language-ext
Akka.NET and AvaloniaUI are two big ones.
I'll add Orchard CMS to this list. Also a lot of the seven seas software.
It is a self-fullfilling prophecy: No big open source without motivated contributors, no contributors because of bad rap because of no big open source projects.
It is not technology what holds .NET back. It is also not politics (nearly all languages have evil overlords). It is people who hold up to statements like: "I will not touch .NET with a 10-stick-pole"
https://github.com/paintdotnet was the first one that came to mind.
Bitwarden
Unity?
Is Unity open source?
I despise working with Nuget. Whether it's a restore, managing your csproj, or publishing packages, compared to NPM it's an absolute mess.
It is the first time I see anyone praising npm.
> .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).
> 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.
Easy 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
1 reply →
Most 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.