Live data from Hacker News

.NET 10 Preview 6 brings JIT improvements, one-shot tool execution

infoworld.com

31–40 of 231 posts

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#31
post #21

I prefer .Net Framework 4.8 Longer lifetime than any .Net version.

Yea that's why I write all my programs in C using the win32 APIs. It has a lifetime even longer than .NET Framework 4.8.1! I'll never have to change or adapt to new things. /s

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#32
My favorite .NET 10 feature so far is not within the .NET library itself, but `dotnet tool exec` to run C# files as scripts without a build step. This has been available in F# for a long time via `dotnet fsi`, and for C# also via the third party cs-script tool. It took a surprisingly long time to officially reach the primary .NET language!

I only really wish C# would’ve been directly integrated as an alternative scripting language in PowerShell. You may balk at the idea for causing a ton of cruft for people who don’t need it; ”a whole new scripting language!” But the thing is — PowerShell already builds upon .NET so supporting a new language is a rather small effort (relatively speaking) if it happens to be a .NET language. And C# just feels so much better for me to code in when the scripts grow in size. I’m not sure I’ll ever become friends with the implicit returns. C# has become particularly suitable for scripting with the recent developments in the language: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#33

All I want is for dotnet watch to behave in a predictable way. In .NET 9, even when using —no-hot-reload, sometimes CSS changes to components are not picked up on Blazor components. It’s so aggravating because ASP.NET with server side Blazor components really has it all: type safety, server-side components ala Astro, fantastic ORM model, great runtime perf. But this little issue makes dev quite tedious at present: di…

I inherited an MVC app that has a bunch of jQuery rendering crap and I would like to move to server side components - since you seem to be into Blazor Server side - have you heard of HTMX ? What would you say would be the benefit of Blazor vs HTMX and Razor Pages for subviews ? My experience with Microsoft UI toolkits after winforms, is that they are all janky over-engineered stuff (Silverlight/WPF/Xamarin/Maui) terr…

As of today (and going forward), there are two different flavors of Blazor server-side rendering. There is the original version where the component is rendered on the server and interactivity is provided via websockets. Now there is also static server-side rendering, which works very similarly to razor pages, pages/components are rendered on the server and there is no interactivity. You can then, of course, add interactivity wherever you'd need it with server-interactive or webassembly interactive sub-components.

I wouldn't necessarily say there's any benefit of Blazor over HTMX, it just depends on what you're most comfortable with and what works for you in your project. But you could architect your front-end in a similar way where you have small blazor components in your pages with interactivity.

I think Blazor is in a nice state now, where I can iterate very quickly on projects with just static server side rendering and add interactivity whenever it's needed. It gives me a very fast website, rendered on the server, and the option to add some interactivity whenever I need.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#34
post #18

One-shot execution looks exciting, what problems does it solve? Less cluttering in the environment?

Scripting, CLI tools ...

It also solves a more subtle problem - when people install a tool globally they install latest _at that time_. But the world doesn't stand still, and things get updated. `dnx` always uses the latest available version by default (you can of course pin with `dnx @`) so that you never get out of date.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#35
post #21

I prefer .Net Framework 4.8 Longer lifetime than any .Net version.

Is upgrading every 3 years really that bad? As far as I know, they typically aren’t removing features or causing disruptive changes in .NET versions. They did when switching away from .NET Framework, but this was because they had to reimplement many features from scratch to work on other platforms, and certain parts got left behind.

With all the dependencies that maybe getting an update to the new .Net version, yes.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#37

.NET was the most sane programming ecosystem that I worked in. Great CLI, great package manager, very good stdlib, strong IDEs/Debuggers, etc. but sadly interesting jobs like OSes, databases and compilers are way less common than in C++ world :(

Since you mention great CLI - is there a CLI tool that is free/cross platform that works like prettier ? I found https://csharpier.com/ but have never heard of anyone using it. Also not sure how it works with linters like roslynator or stylecop ? This is something I miss very much when coming back from TS, other languages also have better formatters. C# is very tied to editors/IDEs which is a nightmare in teams where…

Hi! I use csharpier, it does the job - I included it as a preliminary check in our CI pipeline for a step of merge requests quality assessment. It is the closest tool I found, that ressembles prettier. You should definitely give it a try.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#38
post #21

I prefer .Net Framework 4.8 Longer lifetime than any .Net version.

Yea that's why I write all my programs in C using the win32 APIs. It has a lifetime even longer than .NET Framework 4.8.1! I'll never have to change or adapt to new things. /s

I change things if it’s necessary, not for the sake of using the newest version.

Now I have to update software and all its dependencies without a real benefit.

It’s equivalent of buying a new PC because MS tries to force Windows 11.

Lets waste lots of time and resources for nothing.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#39
post #28

Earlier quoted context omitted.

dotnet format [0] exists and is maintained by the .NET team. It is different from Prettier in that it is much more configurable, but it gets the job done for us. It does integrate language services and can automatically apply code fixes for custom analyzers. I have not explicitly tried roslynator or stylecop, but I suspect this would work as expected. [0] https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-f..…

> It is different from Prettier in that it is much more configurable I only tried it briefly but found it was waaay to lenient with the amount of variance in style it left unchanged (eg line breaks for function parameters) - can it get configured to produce consistent formatting like prettier ?

It can be configured to be much more aggressive with formatting, but I'm not certain if you can force it to produce the exact same output for any possible whitespace in the input.

Re: .NET 10 Preview 6 brings JIT improvements, one-shot tool execution

#40
post #28

Earlier quoted context omitted.

dotnet format [0] exists and is maintained by the .NET team. It is different from Prettier in that it is much more configurable, but it gets the job done for us. It does integrate language services and can automatically apply code fixes for custom analyzers. I have not explicitly tried roslynator or stylecop, but I suspect this would work as expected. [0] https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-f..…

> It is different from Prettier in that it is much more configurable I only tried it briefly but found it was waaay to lenient with the amount of variance in style it left unchanged (eg line breaks for function parameters) - can it get configured to produce consistent formatting like prettier ?

I think there are also a lot of default rules which aren't enforced until they're bumped up in severity in the .editorconfig.

Also it can hook into roslyn analyzers, so if you want a more opinionated analyzer then stylecop analyzers ( https://github.com/DotNetAnalyzers/StyleCopAnalyzers) would be an option, although I haven't used it myself for a long time.

Post reply on HN