Live data from Hacker News

.NET 5.0

devblogs.microsoft.com

151–160 of 466 posts

Re: .NET 5.0

#151
post #132

Earlier quoted context omitted.

to be clear- you are saying it is side by side with netcore31?

Yeah. I guess it depends on how it gets installed, but there’s absolutely nothing preventing it from running side-by-side. I’ve been hot-swapping 3.1 and 5.0-rc2 for projects, preparing for the final 5.0 release.

so, i see 4 different runtime installs (base/aspnet/aspnet-hosting/desktop) here https://github.com/dotnet/core/blob/master/release-notes/5.0... .

where can i find instructions for doing a side by side install? thanks

Re: .NET 5.0

#152
post #22

Earlier quoted context omitted.

Probably Go at this point in time. They care about API stability, keeping scope focused and about technical improvement instead of marketing. And the language is nice to use! There are warts but they take a measured structural approach to resolving them and caring about the change.

Are you saying that .NET API isn't stable? I have code that works from .NET 1.1 back in 2004. I wouldn't use any of their flavor of the month tech they release from the conferences. But the .NET framework has been pretty stable over the last 15 years.

No it doesn’t. Try it on .Net 5.0.

Re: .NET 5.0

#153
post #125

Earlier quoted context omitted.

IIUC, System.Speech was simply a .NET wrapper for the Microsoft Speech API (SAPI), which has been part of Windows for a long time. If you want to move to .NET Core, you can use SAPI via COM interop. Disclosure: I currently work at Microsoft on the Windows accessibility team. We don't own SAPI or System.Speech, but we consume SAPI in Narrator (via COM in C++).

why doesn't MS just release the SAPI wrapper as a windows only nuget package since it already exists?

One thing I've learned in my time on the accessibility team at MS is that even at a company as large as Microsoft, any given team has limited resources and only so many person-hours in a day. So every task has to have a business justification. There probably hasn't been enough demand for releasing System.Speech as a NuGet package to justify it. That's just my guess though; I haven't talked to the speech or .NET teams about this.

Re: .NET 5.0

#154
post #18

As someone who uses .NET daily, but loves Clojure and other functional programming paradigms - Records seem like a very compelling feature. Immutable data structures without any hassle to set up. Simply write “record” where you would normally write “class” and boom, you are working with immutable objects. This is one step closer to one the best features of Clojure IMO -everything is immutable. Additionally, there see…

Aren’t records pretty trivial to create as a custom class in C#?

they compile to classes in the background. the benefit is in the succinct syntax, value-type style equality checks and built in immutability (via the new init-only properties).

Re: .NET 5.0

#155
post #152

Earlier quoted context omitted.

Are you saying that .NET API isn't stable? I have code that works from .NET 1.1 back in 2004. I wouldn't use any of their flavor of the month tech they release from the conferences. But the .NET framework has been pretty stable over the last 15 years.

No it doesn’t. Try it on .Net 5.0.

It works with .NET Standard, .NET Core and .NET 4+ and I am pretty sure when I do the upgrade it will just work.

Re: .NET 5.0

#156

> It’s already in active use by teams at Microsoft and other companies... This means nothing anymore. MSFT says that about everything they release and users are still often left with the feeling that they are guinea pigs testing a very unfinished product. > For Visual Studio users, you need Visual Studio 16.8 or later to use .NET 5.0 on Windows and the latest version of Visual Studio for Mac) on macOS. The C# extensi…

> Reading this makes me wonder who is still using Visual Studio. That IDE is so bad it's beyond believe

Eh? Although I prefer Rider, I don't see how you can make that claim. Yes, it has perf issues, and at least in the past has had some stability issues too, but it's absolutely crammed with features and offers a great dev UX for everything from source control to debugging.

> Why the hell do Windows developers need to install an entire new IDE in order to use the latest version of the .NET runtime? It's ridiculous beyond belief.

To be clear, this is only for existing Visual Studio users. Microsoft has done this for major versions of dotnet core too, and while it's a minor inconvenience, I have believe there is a good reason for it. "ridiculous beyond belief" is a bit strong.

> Really shows that Visual Studio Code is the future.

VS Code and VS are like chalk and cheese - I'm a big fan of VS Code, but for developing with C# I much prefer the features of a full IDE, Rider or VS. Like a debugger, and applying changes during a debug session.

Re: .NET 5.0

#157

People who think this is actually cross-platform need to consider these points: * Debian can't package F# because it is built using MSBuild, and MSBuild is built using MSBuild. How can it be Microsoft doesn't have the resources to get it into a major distribution? * Microsoft won't commit to maintaining any cross-platform GUI libraries. You will be relying on some random community project. Compare this with e.g. Pyth…

>Microsoft won't commit to maintaining any cross-platform GUI libraries. Isn't that MAUI?

MAUI is relying on the community to provide Linux support, just like with Xamarin.Forms. I worked with Xamarin.Forms, it doesn't support hardware acceleration in its GTK backend, making it unusable on HiDPI displays (consumes too much CPU). Why would MAUI be any different?

Re: .NET 5.0

#158
post #44

Earlier quoted context omitted.

You probably know, but F# exists if you want a functional language in the .NET ecosystem. Granted, you end up dealing with a bunch of OOP libraries still since .NET is very C#-centered, but the language is pretty good and the integration is painless.

If I wrote a F# codebase at a lot of companies I would find myself swiftly booted out the door.

Oh yes you'd definitely get booted for using F# in a C# shop. I love F# but would never use it at my current job because nobody else on my team knows anything about FP, even though the language itself can be learned in about a week since it's so simple.

Re: .NET 5.0

#159

Congratulations to the team but more than a year after the Surface Pro X shipped and there is still no way to build desktop applications for aarch64 using dotnet/vs2019 on the local machine. Windows on ARM has no native support for WPF, WinForms, or WinUI. Visual Studio 2019 running as x86 32bits application can't see the local machine as a target for aarch64 applications. When I asked microsoft, the response was to…

Meanwhile, this week launch three Apple products that come with a free toolchain and IDE tailored perfectly to the new architecture that supports old and new UI APIs.

On the Windows side, Visual Studio is still a 32bit application, and as you have pointed out, on ARM, it supports basically nothing but the ancient Win32 C API.

Re: .NET 5.0

#160
post #103

Earlier quoted context omitted.

To me it's just so pointless, here's an example: using Microsoft.Extensions.Configuration; //extra line using Microsoft.Extensions.Options; //extra line public class AdminController : Controller { IOptions settings; //extra line public AdminController(IOptions settings) //extra code { this.settings = settings; //extra line } public void RandomMethod() { var a = settings.Value.FinallyMySetting; // 5 extra lines to acc…

I'm mainly interested in one statement: > it's just pointless boilerplate trash, which C# has been getting rid of excellently Could you elaborate on how you feel C# avoided this? From my point of view the only alternative (to DI with constructor injection) is static members somewhere, which does not scale. Maybe property injection, but ugh.

I think they want to use something more like an environment contextual config fetcher instead.

For example:

test.appsettings.json

{"db-url":"test.url.here"}

prod.appsettings.json

{"db-url":"prod.url.here"}

Now in the code:

Settings.fetch("db-url");

// Will return the test one if environment variable says we are running under test environment, else will return the prod one.

Post reply on HN