This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.
The performance really is astonishing in many areas now. The part that keeps me hooked is the fact that I can stand up something capable of producing those numbers in 30 lines of code using 1st party dependencies only. I can then have a full prototype to demo by late afternoon, again having antagonized over exactly zero 3rd parties. For me, the performance numbers aren’t just about speed while in production. It’s als…
The Case for C# and .NET
231–240 of 376 posts
Re: The Case for C# and .NET
#232I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…
I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…
They are existent and good.
Re: The Case for C# and .NET
#233I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…
I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…
With .NET 6 SDK, 'dotnet new webapi' will give you a template project that does everything you listed save for extended validation logic which you can easily add with 'FluentValidation'.
In addition, to run ASP.NET Core nowadays you only need:
var builder = WebApplication.CreateBuilder();
var app = builder.Build();
app.MapGet("/posts/{name}", ([FromRoute] string name) => /* controller logic, classes will be serialized as JSON */);
await app.RunAsync("http://localhost:8080");Re: The Case for C# and .NET
#234Re: The Case for C# and .NET
#235Earlier quoted context omitted.
.NET core can run on any platform it wants, but as long as it's from Microsoft, the company as we know it, I won't even write "Hello, World!" with it. A language can't be the fastest at everything in today's mature language ecosystem. OTOH, Debian's "Programming Language Games" benchmarks shows it's on par with Java (which is not slow in any means), and not as fast as you claim [0]. In the page I shared, some C# benc…
The difference between the shootout microbenchmarks and the TechEmpower benchmarks is that the former test computation-intensive tasks and the latter test an end-to-end web backend example. It tests how good the compiler is, how good the DB drivers are, how good the HTTP stack is. What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework. Frameworks li…
That proves my point even further, because I don't develop anything remotely web-related, hence that performance scenario is completely moot for me.
> What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework.
Again, the same because the software I develop is not "Enterprise" either.
What I develop is scientific software, and needs to be extremely performant. In my case C++ is the best language, but it's not the best for every case. This is why I also learn Go and use Python for other tasks.
In my case, Debian's benchmarks are directly related to my use cases, however even that's not a definitive measurement for my case. It's just a bunch of data to keep in mind.
Re: The Case for C# and .NET
#236Earlier quoted context omitted.
I'm using Linux for 20 years, and witnessing what Microsoft is doing for more than 25. Being openly hostile towards Linux and plotting ways to lock it out of hardware platforms and tech ecosystems is enough of a motivation for me. It's not only their stance against Linux only, but everything competing with them. I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor…
> I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor which openly kills this interoperability and try to corner market with underhanded tactics. [..] Similarly I don't use Rust because it's LLVM only for now. I'm curious, what do you have against LLVM? I'm sure it supports fewer backends than GCC, no surprise given their relative ages, but it's still got quite a…
I open everything I can, and strictly with GNU/GPLv3+. I want this code can be built and improved upon, even after I abandon it voluntarily or involuntarily. Hence I choose GPL licensed (or close as much as possible) toolchains and tools as much as possible.
For example, I use Eclipse, and include .project files in the repositories, so one can import the project as is, and continue playing, or maintaining the code. I'm improving my Eclipse knowledge to use agnostic paths, so anyone cloning the repo can directly import to Eclipse, and just click build.
I also plan to make my Eclipse and toolchain settings available to make my development environment completely reproducible.
On the case of the Rust, I'm waiting gccrs, which is arriving as an unofficial language in gcc-13. This will both provide an alternative and GPL licensed implementation of the language, and I can be sure that the code I leave behind can be built with the public version of the GCC.
Moreover, I use no compiler specific extensions, because I'm not trying to lock anyone to any toolchain. I'm just trying to make sure that the repo is buildable. I may even add a LLVM (or go-gc) test path to make sure that I don't break anything between implementations.
IOW, I have strong opinions about software freedom, and I apply them to my code, but not force people to obey them (except the license, because I need to underpin it). It's a strong stance, yet there's no insistence. I just set an example, and try to make it a very good one, to show it can be done.
Re: The Case for C# and .NET
#237Just use F# instead and you will have Rust, typescript, Javascript, dart, python all at once https://twitter.com/FableCompiler/status/1550429007443017729...
Re: The Case for C# and .NET
#238Earlier quoted context omitted.
Totally opposite experience for me. C# + .NET ASP core Web Api framework + Swashbuckle + FluentValidation does out of the box what I still haven't seen a good solution for in the NodeJs world (which is the one I'm in now).
NestJS seems to hit the sweet spot for these. I'd add a proper Result type (from fp-ts) to get better error handling (than try-catch everywhere) and you're good to go.
Re: The Case for C# and .NET
#239Earlier quoted context omitted.
Why would you ever waste time using VSCode for C# when VS and JetBrains Rider exist?
I work at Microsoft as a SWE and use VS Code for c# and js. I've been using VS and Rider a bit as well, but after years of doing python and everything else in VS Code, it's just so familiar and it works just fine for everything my team does so far.
I tried VS Code and couldn't get used to it. So now I use Rider for C# and Webstorm for JS. Sometimes I open Visual Studio, though:
> There are some custom plugins someone in my org wrote that help accomplish some team-specific tasks > When I need to work on stored procedures in our SQL databases. Rider doesn't know how to parse the schema from the sql project files, instead it wants me to connect to a live database or it will color everything with little red underlines and give me no autocomplete
I think it's nice that my employer is willing to pay for my Jetbrains licenses despite the fact that it is selling a proprietary competitor and also simultaneously pushing an open source alternative. I appreciate it.
Re: The Case for C# and .NET
#240Earlier quoted context omitted.
I'm using Linux for 20 years, and witnessing what Microsoft is doing for more than 25. Being openly hostile towards Linux and plotting ways to lock it out of hardware platforms and tech ecosystems is enough of a motivation for me. It's not only their stance against Linux only, but everything competing with them. I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor…
> I use Java because there's OpenJDK Which is mostly (~95%) developed by Oracle and is about the same in its openness and community participation as https://github.com/dotnet/runtime/ is. Or maybe you meant OpenJ9? FWIW I also use Linux exclusively, develop (and host) dotnet applications on it, and have my own gripes with it (mostly with Linux still being treated as a second-tier platform which is only good for serve…
As a result, OpenJDK is much more sustainable in the long term, since it can't be closed down and crippled as easily.
While I am no enemy of MIT/BSD style licenses, the "freedoms" they provide to corporations are damaging to open source ecosystem in my eyes.
OpenJ9 looks like EPL licensed, and indeed interesting. It's worth a look.
I'm not writing Java with any considerable volume for some time (because, I didn't need that), hence I was just keeping that in my peripheral vision without paying much attention. However, I'm using Eclipse because it's a great IDE for my needs, and comes with OpenJ9 embedded.
Thanks for bringing this to my attention, will look deeper.