6 ms·
this seems odd. The main advantage other than going faster than Node ( which you'd expect ) is that it's cross platform and can run in containers and has libra
by keithnz 8y ago
this seems odd. The main advantage other than going faster than Node ( which you'd expect ) is that it's cross platform and can run in containers and has libraries.....like MOST other languages.
Not knocking .NET Core, I use it a lot... but this just doesn't seem like it tells you what's special about it
- aerophilic 8y agoI agree, they can do a better job articulating what is “awesome”. 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
- ygra 8y ago> 3. Rosleyn: being able to compile and potentially be as fast as C++ 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.
- sitepodmatt 8y ago1) As a static language C# is extremely weak. You have a minor edge over Java due to reified generics, but in terms of a type system saving your ass C# is miserable. 2) Err... You just came to the party a few years ago. JVM has been running on Linux and MacOS and a host of other operating systems for nearly 20 years. 3) JVM? I like C# but know where it stands.
- a_imho 8y agoFor someone who is not well versed in MS world, what is the C# equivalent of the Java Streams API?
- barrkel 8y agoLINQ, the IEnumerable extension methods, and IQueryable extension methods.
- marxama 8y agoI'd like to point out that the extension method feature of C# is one big reason why I like this whole story much better than the Streams API in Java. There are often methods I wish were part of the IEnumerable interface, and with extension methods, I can add them myself! (if they are not already provided in, say, MoreLinq [1]). Very convenient, and a big boost in productivity. https://github.com/morelinq/MoreLINQ https://github.com/morelinq/MoreLINQ
- BjorksEgo 8y agohaving a look at it, it seems like LINQ?
- arethuza 8y agoI had no idea what Java Streams was (a long time since I wrote much Java) and it appears to be the Java version of LINQ: https://www.foreach.be/blog/java-and-net-comparing-streams-linq https://www.foreach.be/blog/java-and-net-comparing-streams-l...
- wisam 8y agoI would say IEnumerable<T> interface.
- gameswithgo 8y agolinq, kind of, but it has more run time overhead and is more flexible.
- tigershark 8y agoJava streams is the awful copy of LINQ, written something like 7 years later.
- gameswithgo 8y agoI wonder if it is the garbage collected language with the highest performance ceiling now?
- deleted 8y ago[deleted]
- zamalek 8y agoJava might still be faster, and that's deliberate. 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-callstack1.png https://ptrthomas.files.wordpress.com/2006/06/jtrac-callstac...
- saberience 8y agoAs of the latest versions of .net core, it's definitely faster than Java and it's not even a contest. Oracle is asleep at the while and the new version of Microsoft is pushing C# and .net much harder. https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/csharp.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- gameswithgo 8y ago.NET Core now has a ton of memory/data layout control with ref, ref returns, span<t> and also has support for hardware intrinsics as well. 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.
- blinkingled 8y agoSanely designed/mature libraries I might add. I went through an exercise to build a simple web app with Rust and ASP.NET/Core - I was mind boggled how mature the .NET Core stack/ASP.NET felt compared to pulling in 3rd party crates that are constantly in flux. Even after you're done fighting them the code still looks daunting compared to C# - there is a certain cleanliness to it. 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.
- mercurial 8y agoThe .NET ecosystem is a lot more mature than Rust's, there is no arguing that. As for code cleanliness, though, it's debatable. Rust has ADTs, Option, exhaustive pattern matching, Option and Result. C# doesn't.
- drewrv 8y agoThere are a lot of .NET engineers who assume they can't use docker or run on Linux, and simultaneously a lot of other engineers who think if they build on .NET they'll be married to Windows or Azure. So I can see why the cross platform nature of it gets harped on a lot. Personally I think the strongest case for .NET is the C# language and associated tooling, but the only way to really appreciate that is to dive in.
- rtpg 8y agoWell.. I think some people might think "well I need to go faster than Node... so do I need to go to C? Java is slow too. But the C library ecosystem is _rough_...." Nice infrastructure around the language + speed +... not being Rust (with all the difficulties that come with the language)? Is pretty interesting
- ahoka 8y ago>>some people might think "well I need to go faster than Node... so do I need to go to C? Java is slow too. But the C library ecosystem is _rough_...."<< They would be utterly mistaken on all accounts.
- oblio 8y agoThat "all" makes for a bold claim. "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.
- mathw 8y agoThat would be a weird thing to think, because there's a long, long list of languages and platforms which are faster than Node but friendlier than C. Java and C#, two of the most popular languages in corporate development, being very much at the top of it (not necessarily in that order).
- EdgarVerona 8y agoI think it's because C# and (most of) its ecosystem is a joy to use compared to many languages that are popular with large corporations. Having that ecosystem and that particularly delightful language become cross platform is a welcome change, and also a welcome sign that Microsoft is willing to open up a bit more than many of us were expecting.
- bonesss 8y agoWith the right kind of cross-compiler I believe that C# and shim libraries are a near-ideal way to handle javascript development... 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.
- EdgarVerona 8y agoThat would have been/would be fantastic. I'd be all in on that.