by keithnz · 8y ago · 0 comments
Not knocking .NET Core, I use it a lot... but this just doesn't seem like it tells you what's special about it
For me personally, there are 3 main reasons that I have been super excited about .Net core:
1. It is C#, in my opinion the best statically typed language. The easiest way I have described it to other folks is it is Java++. Combine it with really good intelligence, and it is like the code “flows out of you”. Part of the reason for that is the effort put into the language itself (getters/setters, lambda functions, etc), but equally and possibly more important is the support of Microsoft, so this is a language/toolset that is being used daily to make itself better. (In my opinion this is why Jetbrains is so good, the developers use their own tools constantly).
2. It is cross platform from the ground up. I can’t understate how great it is to have an alternative to java
3. Rosleyn: being able to compile and potentially be as fast as C++
Just my 2 cents
Roslyn is the C#/VB compiler and analysis tool. Yes, that allows you to compile C#. No, it doesn't have anything to do with performance. That's where other things come in, like RyuJIT, or .NET Native.
https://www.foreach.be/blog/java-and-net-comparing-streams-l...
Not criticizing Rust which is a very new and different language - I am just comparing it's current state to something as established as .NET now that it's cross platform.
F# is probably a better competitor to Rust than C# though.
But then I would say that ;)
You've got a strongly typed OOP langauge on top that is also pleasantly dynamic and anonymous when it wants to be, available through one of the best IDEs on the market, and it can compile to javascript that is remarkably similar to the original source. You preserve the well-optimized JS runtime for execution, but preserve a primo development experience that eliminates a lot of the pain of larger JS code-bases.
IMO "Typescript" should have just been a compiler variant for C# that was more scripting oriented with associated tooling.
Nice infrastructure around the language + speed +... not being Rust (with all the difficulties that come with the language)? Is pretty interesting
They would be utterly mistaken on all accounts.
"well I need to go faster than Node..."
.NET is generally faster than Node.js, at least based on most benchmarks I've seen.
" so do I need to go to C?"
Is there any other official/stable extension mechanism for Node?
"Java is slow too."
That one, I agree, is false. Java is at least as fast as .NET.
"But the C library ecosystem is _rough_...."
The C library ecosystem is very rough. The lack of memory management and the overall creakiness of C showing its age are easily apparent.
The goal of RyuJIT is understandable code and predictable machine code. HotSpot aims for performance at all costs. Many HotSpot features have been moving over to RyuJIT, even more are planned. I've always been envious of HotSpot. The main feature I've been envious of is its namesake: it aggressively optimizes hot spots. .Net now has this (tiered compilation), but it's still ultimately as-conservative as the compiler a few years back.
The hill that Java has to climb over is the extreme degree of "enterprise code." ASP.Net core is designed with the predictable performance profile of .Net in mind. Java has, well, this[1].
[1]: https://ptrthomas.files.wordpress.com/2006/06/jtrac-callstac...
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Even without the intrinsics C# is beating the JVM on the benchmark game already. Though I think those benchmarks may not all alllow hotspot to do its thing.