Live data from Hacker News

.NET Core 3.0

devblogs.microsoft.com

101–110 of 183 posts

Re: .NET Core 3.0

#101
post #54

Earlier quoted context omitted.

If you're interested in .net and the clr, you could replace c# with f#. It's the most practical functional language that I've tried. Great for domain modeling and it can used in C# projects. I also think that c# is too verbose so what I normally do: asp.net core mvc for routing, templating, authentication / authorization, data access etc and then reference an f# project that contains the domain logic. The best of bot…

As a complete newbie to .net, I’ve tinkered around with f# for a web app and quickly got frustrated. I like the sound of your approach. Do you have any links / resources for the best way to get started with your approach?

Don't try to start with a web app. I'd recommend looking into Fable (the F# to js compiler). Write f# and run it in the browser, I found it to be a better and faster feedback loop when compared to a .net project.

Play around with the f# language (don't touch the js inter-op) until you can figure out if you actually like f#. Take it slow, it's not just a new language, it's a different paradigm. If you get frustrated, take a break for a few days, watch some f# videos and let the knowledge settle. You'll eventually start having evrika moments.

Look into other functional languages. Maybe you'll like others more. Accumulate knowledge and experience until you start thinking "I could do this a lot simpler in f# (or other lang)".

Then, if you want to use f# in a c# project you just need to learn how to reference a project in another project.

If you want some resources: https://fsharpforfunandprofit.com/video/ some of these videos can get you "hyped up" for functional languages

https://www.youtube.com/watch?v=4YO4XmtPFQw

https://www.youtube.com/watch?v=EPfpO_6uFAA

the entire https://fsharpforfunandprofit.com/ site is a good resource to learn everything from the basics to the wizard level stuff.

As an editor you can use Visual Studio but I'd recommend Visual Studio Code with the Ionide extension.

Re: .NET Core 3.0

#102
post #17

Earlier quoted context omitted.

Still no exhaustiveness checking like a true match expression unfortunately, which is what would give it parity against the traditional subclass/polymorphic approach.

Heard it’s being championed for C# 9.

It's so amazing to me how many features from F# or other functional programming languages make their way to C#, and the devs who were otherwise never gonna try those features use them because they are 'normalized'.

I do wish people would give the language that has (relative to this ^ trend) 'already arrived' a chance.

Re: .NET Core 3.0

#104
post #102

Earlier quoted context omitted.

Heard it’s being championed for C# 9.

It's so amazing to me how many features from F# or other functional programming languages make their way to C#, and the devs who were otherwise never gonna try those features use them because they are 'normalized'. I do wish people would give the language that has (relative to this ^ trend) 'already arrived' a chance.

As explained in today's https://news.ycombinator.com/item?id=21049374

> While early adopters may accept some problems on the way (like immature tooling), the majority expects a definite productivity improvement without disrupting the way they work (evolution instead of revolution).

Tooling in F# was/is bad for ages, and also lags in other areas. You have to put up with some disruption to your normal workflow to really embrace it.

Re: .NET Core 3.0

#105

C# (the default .Net lang) has so much ceremony, boilerplate/scaffolding and IDE dependence (IDE programmers) and OOP overhead that it requires 5x more lines of code than the same app in Python or Go. Every time my interest peaks, I take a look leave with the same feeling that it's a dated/bloated OOP relic and would take all the joy out of programming. I've also noticed that most C# programmers don't usually know an…

That was a lot of predispositions. I can say for sure I've never scaffolded anything in C#, I can write a fully functional web app using Notepad++, the different parts of the startup are not hard to memorize, and I can't imagine scaffolding being useful in a console application. Yeah, it requires more lines to achieve the same thing in other languages, that isn't a pro or con. And myself personally, I started with Ba…

> console application

I wrote a console application to splat some addresses in a hex file with version info and keys. Difficulty you want to be able to diff the files afterwards. Was pretty trivial.

Re: .NET Core 3.0

#106
post #40

The only way to get C# 8 is to move to .NET Core, I can't really avoid this anymore. And for me it means moving to ASP.NET Core... Anyone recently migrated projects from ASP.NET MVC to ASP.NET Core? I hope there is a gradual way, like this: https://www.hackernoon.com/how-to-migrate-project-from-aspne...

> The only way to get C# 8 is to move to .NET Core

That isn't true. You can target .Net framework 4.0 onwards.

Re: .NET Core 3.0

#107

Earlier quoted context omitted.

Yes - while WPF and Windows Forms are still Windows-exclusive, there are several cross-platform UI libraries for .NET Core, like Eto.Forms ( https://github.com/picoe/Eto ) and Avalonia ( https://avaloniaui.net/ ). It's also possible to build an Electron wrapper around an ASP.NET Core web app: https://github.com/ElectronNET/Electron.NET

Docker is a better way to distribute apps than Electron, in my opinion. From a developer point of view you just build a regular web app, so better than Electron. From the user's point of view, Docker is better because of isolation, and because there is nothing to install. You run just one command to download and run the image. If you want the app to have its own window then use Chrome's "Create shortcut" command. Thi…

"From the user's point of view, Docker is better [...] run just one command" Nope. Your "better" solution just became fundamentally impossible for 99.9% of users.

Re: .NET Core 3.0

#108
post #102

Earlier quoted context omitted.

Heard it’s being championed for C# 9.

It's so amazing to me how many features from F# or other functional programming languages make their way to C#, and the devs who were otherwise never gonna try those features use them because they are 'normalized'. I do wish people would give the language that has (relative to this ^ trend) 'already arrived' a chance.

That's not the root of the problem. Personally, I wish MSBuild would be more powerful and would allow mixed compilation where some files are in C#, some in F# (or VB.NET or some other language targeting the CLR).

Right now most companies (in the .NET world) just run on C# and no one tries anything new except when it arrives in C# (and even then its a struggle - even though the situation has improved a lot in recent years). A mixed model would also open other scenarios.

The mixed compilation is something that current web tech (using bundlers) has in advance. I can do crazy things and end up with the best (optimized) output using a common denominator.

On the F# track I fully agree - its a wonderful language that more people should try out.

Re: .NET Core 3.0

#109
post #102

Earlier quoted context omitted.

It's so amazing to me how many features from F# or other functional programming languages make their way to C#, and the devs who were otherwise never gonna try those features use them because they are 'normalized'. I do wish people would give the language that has (relative to this ^ trend) 'already arrived' a chance.

That's not the root of the problem. Personally, I wish MSBuild would be more powerful and would allow mixed compilation where some files are in C#, some in F# (or VB.NET or some other language targeting the CLR). Right now most companies (in the .NET world) just run on C# and no one tries anything new except when it arrives in C# (and even then its a struggle - even though the situation has improved a lot in recent y…

well there is some mixing at the solution level. You could have an F# project containing your domain model, and a C# project in the same solution just fine - but it would be nice to mix in the same project.

Re: .NET Core 3.0

#110
post #76
post #23

I have been developing in .Net MVC 5 and now the last 6 months in .Net Core 2.1. Core is pretty awesome, I would say the learning curve is pretty high, but I'm very satisfied. Previously, I used Java in school. The .Net stack offers a lot of jobs in enterprise companies, if you are someone that dislikes SV mindset. Also, Visual Studio is an insane IDE. Although, I recently did have some nasty bugs but updates are com…

Re: I would say the learning curve is pretty high If you had to rank and list the top rough spots in the transition, what would they be? Entity-Framework changes are often cited, but what else is different enough?

I went from developing front-end only with the MEAN stack, to full-stack with Webforms, to MVC...and I was easily more confused with the transition to MVC than anything else. Even being accustomed to EF now, I still would bet money that I could write data access code twice as quickly with half as many issues. I fail to see what's so much better about working with an object than understanding SQL and your data. Everyone claims MVC is a more natural, transparent web development paradigm, which I sort of agree with, but anyone who hasn't written APIs or worked with EF before will find themselves trading a lot of productivity for it.
Post reply on HN