News for hackers. Stuff that matters.
Re:.NET 9 Is Out by leosanchez on Wednesday November 13, 2024 @11:45AM (#42127615)
They didn't add anything significant to the language this year. Maybe next year we will get new extensions feature.
Re:.NET 9 Is Out by Dwedit on Wednesday November 13, 2024 @12:03PM (#42127803)
Is this the feature that would let you put extension properties on everything?

The most obvious way to store backing fields for arbitrary objects is to have a global concurrent dictionary that stores weak keys, and a compiler-generated class to store the backing fields as the value. But then you have a performance problem of needing to do a lookup from a weak-concurrent-dictionary every time you access any extension backing field.

The higher-performance alternative would be a second shadow variable in code that uses the extension backing fields. Do your dictionary lookup, then cache the backing-fields-object so you don't need to redo lookups for it. But that would be function-local.

If the extension property doesn't need a new backing field, it's trivial, you're just making a new getter and setter function pair.

Re:.NET 9 Is Out by bob1029 on Wednesday November 13, 2024 @11:57AM (#42127740)
Re:.NET 9 Is Out by jf22 on Wednesday November 13, 2024 @11:46AM (#42127621)
Did you mean C# the language?
Re:.NET 9 Is Out by leosanchez on Wednesday November 13, 2024 @11:49AM (#42127658)
Yes. Language and framework are released at the same time every year
Re:.NET 9 Is Out by mihular on Wednesday November 13, 2024 @11:51AM (#42127678)
Are there others?

Edit: include ;-) at the end. Client filtered it out...

Re:.NET 9 Is Out by kogus on Wednesday November 13, 2024 @11:56AM (#42127723)
Yes. There are three "official" .NET languages: C#, Visual Basic, and F#.

https://dotnet.microsoft.com/en-us/languages

Re:.NET 9 Is Out by mikece on Wednesday November 13, 2024 @12:02PM (#42127800)
Wow... I keep forgetting that VB.net is still a thing. Pretty much everyone who was writing ASP code before the switchover adopted VB.net and then flipped over to C# around 2005 (.NET version 2).
Re:.NET 9 Is Out by BJones12 on Wednesday November 13, 2024 @11:57AM (#42127739)
RIP J#
Re:.NET 9 Is Out by vips7L on Wednesday November 13, 2024 @01:32PM (#42128638)
RIP Midori
Re:.NET 9 Is Out by dlachausse on Wednesday November 13, 2024 @12:41PM (#42128215)
It’s a shame the “Iron” family of scripting language implementations seem to have stalled out.

IronPython and IronRuby had a lot of potential.

Re:.NET 9 Is Out by qingcharles on Wednesday November 13, 2024 @12:04PM (#42127830)
Re:.NET 9 Is Out by mihular on Wednesday November 13, 2024 @11:59AM (#42127755)
Argh, my client omitted a wink smiley I've included at the end . It was meant as a joke.
Re:.NET 9 Is Out by aithrowawaycomm on Wednesday November 13, 2024 @12:04PM (#42127820)
Did you mean "are there other things called C# besides the language?" I think people missed the joke because they interpreted your comment as "are there other .NET languages?"
Re:.NET 9 Is Out by sedatk on Wednesday November 13, 2024 @11:53AM (#42127694)
Yes, they also released F# 9.
Re:.NET 9 Is Out by mihular on Wednesday November 13, 2024 @11:50AM (#42127665)
Yep, nothing much for average applications. It's a pity that extension properties didn't make the cut.
Re:.NET 9 Is Out by sebazzz on Wednesday November 13, 2024 @01:15PM (#42128500)
Rather have it being designed carefully, than having a half baked feature like primary constructors.
Re:.NET 9 Is Out by qingcharles on Wednesday November 13, 2024 @12:03PM (#42127810)
That was on purpose. There was a lot of issue-closing on GitHub. Especially MAUI which got a ton of bug fixes.
Re:.NET 9 Is Out by dlachausse on Wednesday November 13, 2024 @12:38PM (#42128180)
MAUI looks really good in theory, I’m curious to hear about anyone’s experiences and thoughts about using it in production.
Re:.NET 9 Is Out by randyburden on Wednesday November 13, 2024 @02:06PM (#42128884)
I've written 3 apps in MAUI with 2 in production.

The 2 apps in production are MAUI Blazor Hybrid apps. The learning curve was very small since I already was familiar with C# and Razor syntax after having built many C# server-side rendered web apps. Development is quite rapid since it's essentially using web technologies. For my use cases, the users do not care about the app looking native as these are B2B apps. Both apps are deployed in the 2 major mobile app stores and 1 app is also deployed in the Microsoft Store.

The 3rd app was an internal-only Android app built with the UI written entirely in C# instead of XAML. I chose to write the UI in C# instead of XAML primarily just for fun and to see how that would work out. I ran into a lot more issues using native UI when it came to me wanting to customize things, such as removing an annoying bottom text underline/border that is added by default to Entry (textbox) controls.

I'll probably never build another native UI app if I have the choice and will stick to MAUI Blazor Hybrid apps because it is so much faster to create the app using web technologies (HTML/CSS).

Re:.NET 9 Is Out by sebazzz on Wednesday November 13, 2024 @01:14PM (#42128491)
The DigiD app in the Netherlands, used by almost every citizen to log into government and government-related services (taxes, social security stuff, message box, seeing your own data, portal of local municipality, etc etc etc) is written in Xamarin Forms and is now written in MAUI for a while. It even made Hacker News a while ago due to the progress indicator!

https://news.ycombinator.com/item?id=34425614

Re:.NET 9 Is Out by leosanchez on Wednesday November 13, 2024 @12:50PM (#42128295)
Bitwarden moved away from MAUI IIRC maybe you can search about that