Live data from Hacker News

What Makes .NET Core So Special?

blog.jamesmichaelhickey.com

161–170 of 247 posts

Re: What Makes .NET Core So Special?

#161
post #146

Earlier quoted context omitted.

If you're worried about memory usage, then neither is great (C# is a little better than Java), you may want to look into Go or Rust.

In this list we also have D and Swift. Good on yr mem, general purpose-y (Go is not a GP lang), quite popular.

> quite popular

Disagree, especially on the same level as the others with D, and especially concerning cross-platform ecosystem with Swift.

Re: What Makes .NET Core So Special?

#162
post #158

I’m in the process of porting a bunch of go code to dotnet core 2.1 on AWS lambda. I’m on a Mac using vscode. I never installed mono, just the dotnet sdk. Honestly, I’ve been amazed at how good the tools have been. For cli and serverless dev, it’s been surprisingly great. It’s fast. C# is decent. The cold starts are not as fast as go, but not terrible. Memory usage is low. It’s been a legitimately positive experience…

I'm a huge C# advocate but we actually went the other way. Regardless of the tooling etc. we still have to use Golang for mission critical stuff. This is mainly due to the cold start times you mentioned - mainly the "first request" problem C# has with web related requests. I've been keeping up with the latest developments, and it seems that they're finally starting to address the problem with tiered compilation stuff…

You can usually cut the cold start performance in half by enabling Tiered Compilation. It's just one parameter in your project file, or via an environment variable.

Disclaimer: I work on performance in the ASP.NET team.

Re: What Makes .NET Core So Special?

#163

Earlier quoted context omitted.

It’s not just about EF. The beauty of C# and Linq is: Linq => expression trees => provider => native query language of data source => data source. Written correctly, you can pass expressions around like: repo.Find(c => c.age > 65 && c.gender == “male”) And the expression can be interpreted at runtime by either EF creating native sql or the Mongo driver creating a native MongoQuery or even an in memory List for unit t…

Except EF is basically the only provider that works 100% robustly. I have some pretty bad memories of getting NHibernate's Linq provider to work correctly, since it would just randomly mistranslate queries or flat-out throw exceptions.

The Mongo Linq driver is excellent. It’s not exactly an ORM, but it does let you work with strongly type collections and the queries it produces are pretty good.

There was also another Linq/ORM I used back in the day for Postgres. I can’t remember the name of it.

Re: What Makes .NET Core So Special?

#164
I just inherited a .Net core app that was a proof of concept. It's a real pot luck of glued together functionality. I remember working in MS ASP land almost 2 decades ago and I swore I wouldn't invest a single minute learning another proprietary MS technology.

I by and large held to that but here I sit, banging away at some C# code. This is day 3. Did you know if you specify a path in JSON and apply it to Use app.UseStaticFiles with a single trailing slash, instead of a double, it'll bring down the .Net kernel in flames.

Not confidence inspiring in the least.

Re: What Makes .NET Core So Special?

#165
post #158

Earlier quoted context omitted.

I'm a huge C# advocate but we actually went the other way. Regardless of the tooling etc. we still have to use Golang for mission critical stuff. This is mainly due to the cold start times you mentioned - mainly the "first request" problem C# has with web related requests. I've been keeping up with the latest developments, and it seems that they're finally starting to address the problem with tiered compilation stuff…

You can usually cut the cold start performance in half by enabling Tiered Compilation. It's just one parameter in your project file, or via an environment variable. Disclaimer: I work on performance in the ASP.NET team.

Said that in the post above :) however it doesnt seem to impact HTTP requests or requests to a signalr hub for the first time after boot.

We've had tiered compilation enabled since it came out as an option, but the first requests are still dog slow

Re: What Makes .NET Core So Special?

#166

Earlier quoted context omitted.

I'm complete new to C# and Java but I'm looking into them to choose a new language to learn. I'm mostly worried about memory consumption since I often use a cheap $5 VPS. Would you happen to know which one would be a better fit for my use case? Thank you.

If your end game is working professionally just check what is more in demand in your geographic location. Personal opinion C# is a lot better than Java. You have less boilerplate code (getter and setter in 2018, really?) and lambdas are great. But really both are similar so you can pretty much just start with one and still find your way in the other.

Java is the most popular language of the JVM ecosystem, but not the only one. If I were to restart from scratch, I would seriously look into Kotlin, which is how Java should have been.

Re: What Makes .NET Core So Special?

#167
post #108

Earlier quoted context omitted.

I 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…

For someone who is not well versed in MS world, what is the C# equivalent of the Java Streams API?

Java streams is the awful copy of LINQ, written something like 7 years later.

Re: What Makes .NET Core So Special?

#168

Earlier quoted context omitted.

I'm complete new to C# and Java but I'm looking into them to choose a new language to learn. I'm mostly worried about memory consumption since I often use a cheap $5 VPS. Would you happen to know which one would be a better fit for my use case? Thank you.

If you want to be on the JVM I highly recommend giving Kotlin a look before Java. Great language and excellent tooling.

I would like to learn Kotlin, but I've no prior knowledge about Java... That's a real impediment?

If it isn't, do you know (by chance) about some resource(s) for a total newbie/newcomer to the language?

thanks in advance.

Re: What Makes .NET Core So Special?

#169

I’m in the process of porting a bunch of go code to dotnet core 2.1 on AWS lambda. I’m on a Mac using vscode. I never installed mono, just the dotnet sdk. Honestly, I’ve been amazed at how good the tools have been. For cli and serverless dev, it’s been surprisingly great. It’s fast. C# is decent. The cold starts are not as fast as go, but not terrible. Memory usage is low. It’s been a legitimately positive experience…

I'm curious: what was the problem with Go?

The domain experts all write C#, and I don’t have strong language preferences, so it’s easier for me to switch to C# than it is for them to switch to Go. There isn’t a real technology reason, it’s just team ergonomics.

Re: What Makes .NET Core So Special?

#170

I want to like .Net Core, I really do. But in my opinion its just not yet ready for serious use. An example. If you want to use .Net Core you can't use entity framework, you have to use EF Core, which doesn't yet support mapping to views or stored procs, only tables. Now you might think that's fine, maybe you only want to map to tables. But it's the same story all over the ecosystem. Many major projects have a separa…

We use .NET core in production and are very happy. A mixture of EF Core (for ad-hoc queries) and Dapper (for stored procs) works just fine. Also, new in EF Core 2.1, you can map views and stored procs just fine: https://docs.microsoft.com/en-us/ef/core/modeling/query-type....

That's your only specific example - what other functionality are you missing?

You're not willing to commit to .NET core but you admit that NetFx is going into maintenance mode?

Post reply on HN