.NET 11: unions, MAUI ready for business, but what comes next?

Microsoft has released .NET 11, as part of the online .NET Conf under way today and tomorrow. It is not a long-term support (LTS) release though that detail does not mean all that much; it will be supported for two years, and if like me you upgrade soon after each new release everything is fine.

.NET 11 is now fully released

New features include union types in C# 15, faster asynchronous code, Core CLR on all platforms in place of Mono in MAUI (Multi-platform app UI), and hundreds of other improvements across the runtime and frameworks including ASP.NET Blazor and even the venerable Windows Forms.

Personally I am most interested in the performance improvements, and in the progress of .NET MAUI which after years of troublesome issues now looks to me a strong contender for cross-platform mobile and desktop development.

I like programming in C# and for me it hits a sweet spot of safety, performance and ease of use. Microsoft’s stewardship of the language and of .NET has been good in general, though it fumbled the handover to the .NET Foundation. There is still too much dependence on one company and despite the open source and cross-platform aspect, the technology remains associated with Windows which holds back adoption.

For further background on the inadequacy of the .NET Foundation check out this report from F# Software Foundation Executive Director Reed Copsey which says “I find myself unable to honestly recommend anybody put time or effort into the Foundation, or recommend joining as a member” and that “independence of the Foundation is disingenuous” thanks to bylaws that ensure that “the .NET Foundation is prevented, by design, from being able to self-govern and impact meaningful changes without direct support of Microsoft.”

The future of .NET is in largely in Microsoft’s hands and the question is where it will go now that programming is in the process of disruption by AI, a process which is still under way and the outcome of which is uncertain. If one takes the view that coding will largely be done by AI in future then programming languages and runtimes will change accordingly. We can see a little of how Microsoft is thinking about this with the introduction of WinUI Reactor, a framework for WinUI application using C# that is designed for agents as much as for people.

If we consider though the elements of the sweet spot I mentioned above, safety, ease of use, and performance, we may conclude that ease of use is no longer important (because humans are not using the language), and that for performance we should ask AI to use a system language such as C, C++ or Rust. And of these three, Rust is a winner because safety still matters, and AI is not immune from making memory safety mistakes.

I am therefore uncertain whether we will see the established yearly cycle of major .NET releases every year repeat for much longer. Microsoft may shift more investment towards AI and Rust.

That said, Microsoft has a strong track record of maintaining technology in use by its customers and developers can be confident that .NET and its various frameworks will continue to be maintained for long into the future.

C++ in crisis following disapproval of C++ 26

A member of the WG21 C++ standardisation committee, Andreas Fertig, has asked “how does C++ survive” following the disapproval of C++ 26 by the ISO National Bodies.

C++ will survive but there is now a question mark over C++ 26, which was already approved by the standardisation committee and for which approval by the national bodies is normally a formality; Fertig said that this is the “first time in the history of C++” that it has happened.

The reason for the disapproval is a particular feature: Contracts, a means of setting preconditions and postconditions on function declarations and adding assertion statements within functions. Although the idea behind Contracts is generally welcomed, there are disagreements about the implementation. Herb Sutter, chair of WG21 is an advocate for the C++ 26 implementation, while Bjarne Stroustrup, inventor of C++, is opposed. Stroustrup said that the feature is “adding complexity in very obscure ways … I worry about the complexity, I worry about whether we can use it correctly.”

Stroustrup faces obstacles standardising a feature he champions called Profiles, which like Contracts are intended to improve the safety of C++ code. Another C++ expert, Sean Baxter, argues that “after a decade of effort, Profiles failed to produce a specification, reliable implementation or any tangible benefit for C++ safety. The cause of this failure involves a number of mistaken premises at the core of its design.” The controversy around profiles resulted in the proposal being removed from C++ 26 though still possible for C++ 29.

The question is what happens next for C++ 26, which also includes significant features such as Reflection and Annotations. Fertig said that the next steps are “more than uncertain”; the next WG21 meeting is on November 16th and will try to resolve this. If the Contracts feature is removed, a further vote on C++ 26 would probably pass; but this would require the committee to abandon a feature it strongly supports. Another possibility, according to Fertig, is that C++ 26 will be cancelled, extending the life of C++ 23 as the latest version.

It is a problem for the standardisers and also for the trust within the community. Depending on your point of view, this is an example of tyranny of the minority, or that one cannot proceed without greater consensus. Discussion here and here shows that developers in general have reservations both about the implementation of Contracts and regarding the over-complexity of the C++ standard.

Microsoft’s AI assisted blog posts

Last week I wrote about Microsoft’s Reactor framework, a React-inspired C# framework for WinUI, using an official blog post by principal software developer engineer Alexandre Zollinger Chohfi as one of the sources.

But was the post really by Chohfi? As I read it, I was pretty sure that it was AI-generated. Pangram, an AI detection engine, agrees with me (note this is based only on the first 388 words).

Pangram is confident that the Microsoft post was AI-generated

I see a lot of AI-generated text, for example in my own (light) use of AI coding tools, in code comments and issues on GitHub, in forum posts, and in emails. There are many indicators, though it is hard to pick them out in what is a subjective impression. A phrase like “new controls and patterns get tried here first, and the ones that prove themselves are candidates to land in WinUI itself” just sounds like AI to me. It is not bad writing, but why “to land in WinUI”? Why not, “for WinUI”? It is breezy for the sake of it, and does not come over as something a human would write.

Questions that interest me are first, does it matter, and second, should it be acknowledged, in the same way that Facebook now marks some posts as “AI content” (though I’m not sure how accurate it is).

For me it does matter. In particular, the AI-generated or AI-assisted content removes the personality of the human author who oversaw it, even if the text ends up being better written by some metrics. I would rather have worse English but with a sense of who the author is and what they think and feel about their subject matter.

There is also the possibility of AI-generated mistakes, though if the text is properly reviewed this should not be a concern. With a journalist hat on, I think it is OK to quote such text as if it were written by the author to whom it is attributed. That person is taking responsibility for the text by putting their name to it.

Should it be acknowledged? I would prefer this, but acknowledge that it is difficult. If someone fixed spelling or changed punctuation because of squiggly lines in Microsoft Word, is that AI assistance? Not really. It is hard to determine at what point the line is crossed.

I suspect that part of the reason for using AI assistance is that people lack confidence in their own writing, particularly if it is not in their native language. That is understandable, but from my perspective, I want to hear from the author, not a bland AI-generated post based on the author’s notes, or worse, an author sitting back and letting AI do all the research and the write-up as well.