Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C# is solid. It’s not necessarily the best at anything (is it?), but its floor is like a 3 out of 4 across the board.

I remember making a big spreadsheet of languages and a bunch of potential areas of use. Building desktop apps, mobile apps, games, concurrency, performance, cloud native, web apps, data pipelines, and machine learning. C# is 3 out of 4 on all of those, except maybe 4/4 on games with Unity, and being cloud native with Azure, C# gives you a bunch of stuff automatically especially around observability.



C# has changed a ton in the last few years, it’s definitely 4/4 for me…


It's getting closer and closer to TypeScript.


You presumably are aware that C# and TypeScript share the same original language designer


Yes; GOAT.

What's interesting is whereas a very large community has embraced TS, C# feels like it hasn't gotten as much love despite being so similar at a language construct level (async, exceptions, generics, etc.)


They were made by the same dude, so it makes sense they are similar.


Probably the other way around...


It's bi-directional. In recent years, C# has gained destructuring, collection initializers, tuples, and a few other niceties.

JS/TS are missing expression matching that C# gained, but there's a proposal for it for JS. C# is missing discriminated unions, but there's a proposal in process for it.


I am a huge C# advocate, and with the AOT stuff since .NET 7, they are really working overtime to add features for safe low-level operations.

Some of the niceties over the last several versions include immutable record types, stack allocated structs (ref structs), lambdas (and a host of enhancements thereof since), async/await (of course), generic math ops, platform intrinsics, pattern matching, AOT, nullable types, robust generics, reflection, dynamic types, etc. The big thing I expect next is algebraic data types.

The language has really grown by leaps and bounds, but it doesn't ever feel overwhelming, and it has really kept its verbosity to a minimum without turning into a soup of hieroglyphics.

That being said, I have found the Android/iOS solutions to be underwhelming. I understand the iOS side a bit, but I thought Android would be better. That's not to say you can't make great applications using C# on these platforms, just that it requires more effort.

I'm also not a huge fan of ASP.Net. I've never really cared for it, and I think that stems from a project I had early in my career duct-taping together another developer's classic ASP applicat^HHH monstrosity and mucking about with IIS and FoxPro (!!). I know it's not classic ASP, but once bitten, lol. I will say that it is modern and performant, but very rigid. I'd defer to others' opinions here because I have mostly avoided it.

But in general, the tooling is great, and I don't encounter much that ties you to a Windows box anymore. I know there are some differences in platform support, but most of the rough edges were handled in the early days of .NET Core 2 & 3. Now that we're way past that (the "traditional" .NET merged with .NET Core in a combined version 5 release). Now that it's on version 9, the language features and low-level hits keep coming. I can, today, write code that is 99% of what you can get from C++ (and in some edge cases can exceed it), compiled to native code, that will run on Windows & Linux (x64 & arm64), BSD & MacOS without too much trouble.

And as a fellow HNer pointed out the other day on an unrelated thread, the native interop is painless. You can load .dll, .so, .dylib files with ease. No frankenstein FFI (ala Go or Java).

The language is safe. GC can be avoided (or controlled), and it offers raw pointers, manual memory manipulation with spans, and more low-level features through the unsafe subset of functions.

I know people like to say this started as a rip-off of Java, and there is some truth to that, but I have too much respect for Anders to believe he set out to rip off Java part and parcel. There was a method to his madness, and from my perspective, C# has always been a step ahead in programmer ergonomics (but definitely not performance). Maybe that's due to the sheer intertia of the Java ecosystem, or to Sun and then Oracle being more conservative, I don't know. Hell, it probably had more to do with Microsoft's reputation.

I value programmer ergonomics and tooling, almost above all else, and I am a happy camper. You can write C# from several different angles as you see fit, and in most cases it checks all the boxes for a large subset of projects.


> I'm also not a huge fan of ASP.Net. I've never really cared for it, and I think that stems from a project I had early in my career duct-taping together another developer's classic ASP applicat^HHH monstrosity and mucking about with IIS and FoxPro (!!). I know it's not classic ASP, but once bitten, lol. I will say that it is modern and performant, but very rigid. I'd defer to others' opinions here because I have mostly avoided it.

Indeed, it's a completely different product nowadays.

Take a look at this! https://learn.microsoft.com/en-us/aspnet/core/fundamentals/m...


Microsoft sucks at naming. They have reinvented their web stack several times, but have stuck with the ASP (.Net) moniker.

There's ASP, ASP .Net WebForms, ASP .Net MVC, ASP .Net WebApi, ASP .Net Razor Pages, ASP .Net Minimal API, ASP .Net Blazor (several forms of it, too). Some of them suck, some of them are very nice, but that's incredibly confusing for people not familiar with the stack and job seekers trying to determine how much they will hate the new job.

It's like React being called jQuery RX, Vue being called jQuery RX 2 and Svelte being called jQuery SX.


> That being said, I have found the Android/iOS solutions to be underwhelming. I understand the iOS side a bit, but I thought Android would be better.

And Mac OS.

With the discontinuation of VS Code for Mac, I'm pretty concerned whether Microsoft is going to keep supporting those platforms.

I've only looked at .NET briefly, but it seems that they're not even adding new Mac APIs to the C# bindings any more, and most of the documentation mentions old Mac OS releases like Catalina.

I don't think they'll ever drop Mac support completely, as plenty of people develop ASP.NET applications on their Macbooks, but I'm very hesitant to use .NET for desktop applications where native integration is key. Especially now, when Microsoft seems to be going all-in on Catalyst.

They don't seem to care much about Xamarin either, favoring other technologies like React Native.


> With the discontinuation of VS Code for Mac

Wait, what? Surely you mean the version of Xamarin Studio that MS bought and called Visual Studio for Mac. I just used VS Code on a Mac yesterday.

Xamarin Studio was garbage. While I will admit it is not easy to get VS Code to play nicely with .NET (an irony that is not lost on me), it still remains possible to create a not-buggy, fully featured .NET development experience in VS Code. Neither of those qualifiers were possible in Xamarin Studio.


I’ve worked with ASP.net many years and it mostly gets out of your way. I feel very productive with it.


Java the language is conservative by design. They always are the last mover for language changes on purpose. They feel that it allows them to make better decisions and they don’t have to adopt bad ideas until other languages try them out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: