How to open calc.exe from S&Box
24 points by calvin
24 points by calvin
I could do an entire blog post on just how good C# is, but I’ll spare you that here.
Aw, I'd read that. My opinion of C# mostly boils down to "Microsoft" right now, but I do know that it has some interesting-looking features. LINQ comes to mind even if it's not one I particularly like the idea of.
Any C# enjoyers here?
C# is my favorite language, it does enough right (amazing runtime, decent ecosystem, regular iterative improvement in the language) for it to be the tool I usually reach for when I want to build something. I think it's the only Microsoft product I actually have a fondness for. My biggest pet peeve is the lack of free functions in a language that benefits massively from adopting functional patterns into your codebase.
Also the second biggest missing feature, discriminated unions, are being added to the language with C# 15 in November!
C# is the bulk of my professional work right now and also my usual pick for side projects too. You pretty much put down all of my thoughts on it, including the celebration over finally getting discriminated unions this year.
I have some minor quibbles with some of the newer syntax changes but they're mostly grumbling about newfangled changes (the ASP.NET "minimal" API still feels deeply weird to me)
The new extension feature has a syntax only a mother could love!
I understand where you're coming from with minimal APIs, it seems like they were trying to steal some heat from express.js with how it's structured. The below article softened me on them though.
https://www.tessferrandez.com/blog/2023/10/31/organizing-minimal-apis.html
LINQ comes to mind even if it's not one I particularly like the idea of.
I used to not like it either with an initial "what method do I call to do this" learning curve (Rider is useful here by offering to transform trivial loops into LINQ for you)
But coming from Go where even the most trivial loops often are written by hand, it's insanely useful for filtering and allows compressing loop constructs pretty concisely.
It's also a foundational building block for EF Core query building, which despite the occasional query translation failures, I still prefer a whole lot over writing SQL by hand.
I know that for Go libraries like https://github.com/samber/lo exist, but usually it's difficult to justify in a project for me (ignoring that a utility library now needs an Agent Skill, I guess...) compared to LINQ where it's just... there
Almost all my side projects use C#. It's very ergonomic, builds super fast for quick iteration, comprehensive library ecosystem.
And the language continues to evolve. Nullable reference types, various pattern matching, records, it's a nice mix of imperative and functional.
What's really stopping them from actually sandboxing the code properly? C# has first-class support for sandboxing: https://learn.microsoft.com/en-us/dotnet/framework/app-domains/use
AppDomains are deprecated. From your link:
This article is specific to .NET Framework. It doesn't apply to newer implementations of .NET, including .NET 6 and later versions.
If all you care is to isolate assemblies, .NET Core does have AssemblyLoadContext. I've used this to work around some stubborn static classes from incompatible assemblies.
But it doesn't provide guarantees that AppDomains (I assume) promise, the docs say ALC has the same process permissions and MS suggests you to use another process if you want isolation