Live data from Hacker News

.NET 5.0

devblogs.microsoft.com

231–240 of 466 posts

Re: .NET 5.0

#231

Earlier quoted context omitted.

You know a better way of doing this? appsettings.Test.json Voila, different settings! I've said elsewhere, the DEFAULT should be super simple, really, really, really easy to use. No thought, no effort, just use it. If you want to go all crazy and start injecting values into your config in your unit tests, great to have that option, you should have that option. But you're the one who should be scrabbling around writin…

I'm going to have to disagree here. Having a settings object is much easier then appsettings.Test.json The .json is for running the application locally. A unit test should be able to cover if a setting has value 'a, b or c', which is much easier with a regular object.

Making software harder to read, write, and maintain in the name of making unit tests easier to read, write, and maintain is putting the cart in front of the horse.

Re: .NET 5.0

#232
post #29

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

I found Go to be a really nice replacement for C#. It has the static typing and garbage collection, but you also get a self-contained binary executing without the requirement of an external runtime environment. I also discovered that I don't miss classes at all.

C# doesn't require classes with the latest release.

In what capacity are you using Go that made it a good replacement for C#? Microservices? If so, which framework are you using?

Re: .NET 5.0

#233

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…

Similarly, porting from HoloLens 1 (x86) to HoloLens 2 (aarch64) has been... challenging in many cases. For instance, there is no Fortran compiler easily available for Windows aarch64, but Apple has promised to ship one for the new Apple Silicon on day 1. EDIT: Here it is, right on time -- https://www.nag.com/news/first-fortran-compiler-apple-silico...

It's because Microsoft is a small company with no history of implementing programming languages.

Re: .NET 5.0

#234

Earlier quoted context omitted.

>I agree. The first thing I always do is make a custom Settings class which just loads settings via good old `Environment.GetEnvironmentVariable`. Super simple and never failed me. The .net core configuration mechanism has a hierarchy of providers it reads from, one of which is environment variables, and strongly typed configuration is supported out of the box, so you're exact use case is supported natively by it.

I am aware of this, but like many other, I find the IOptions a bad abstraction. This blog has similar thoughts: https://rimdev.io/strongly-typed-configuration-settings-in-a... or this blog: https://adamstorr.azurewebsites.net/blog/beyond-basics-aspne... Or simply google 'asp net strongly typed configuration' and notice everyone seems to be reaching similar conclusions and building their own things. Just load the sett…

I don't like it either, but one advantage is that the settings can be live updated when the config files change

Re: .NET 5.0

#235
I wish the post was more direct that .NET 5 is the successor to .NET Core 4. I gathered this was the case but it didn't feel clear that I don't need '.NET Core' anymore to run .NET on mac/linux.

Re: .NET 5.0

#236

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…

How does bootstrapping work for other products in debian? GCC is built using GCC and cmucl is built using cmucl.

Re: .NET 5.0

#237

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

I can get behind the DI dislike, but how are callbacks and promises in nodejs better than async in .NET?

Re: .NET 5.0

#238

I used to be an asp.net developer before. I appreciated the idea behind asp.net during its early years - making websites fast and with templating (or scaffolding). Later realized that it is bloat. Then asp.net mvc happened, a whole new paradigm shift. But then I disliked the idea of stuff getting inherited from somewhere. *.cshtml files and all. Soon I realized what the ide is actually doing behind the scenes. For e.…

> But I wish stuff was as simple as having a plain editor and getting started. This is the wrong thing to wish for. It's like... wishing for "simpler times" of the pre-modern era. You know, the simpler times without dentistry and plagues that make COVID look downright pleasant. Simpler times of backbreaking manual labour, shovelling ditches by hand. A typical computer can now process 10 billion general-purpose instru…

when it comes to text editors vs IDEs, that's not the point. it's not about wanting a rudimentary experience, it's more like wanting to build a PC vs buy a macbook.

when the very _syntax_ of a language is designed such that it's really only usable within a specific IDE, then all of your tooling is limited by the capabilities and decisions of that IDE.

Re: .NET 5.0

#239
post #22
post #7

Earlier quoted context omitted.

What would you choose for server code?

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.

Go might care about their own API stability, but it took them years to stop doing direct syscalls on macOS (where it is not a stable ABI); and last I checked, they were still doing that on BSDs.

As for technical improvements, well... it's a language that took, what, almost a decade to add generics? And that's because the designers were claiming that everybody else is doing them wrong, and they want to figure out how to do it right. Now that they're finally adding them, turns out that they look exactly the same as everybody else's.

Re: .NET 5.0

#240
post #208

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

I'm so glad I'm not alone. I adore C# and the .NET runtime is so convenient. But the ASP.NET part feels bloated. Is there a simpler .NET framework?

I didn't use it recently but Nancy was quite good: https://nancyfx.org/
Post reply on HN