News for hackers. Stuff that matters.
Re:.NET 8 by financltravsty on Tuesday November 14, 2023 @11:21AM (#38265327)
Lots of very cool stuff here (AOT, Aspire, etc.).

.NET has been held down by the image of its early days, but it has become a pure joy to work with recently. The improvements in tooling and ergonomics have made it a replacement for Go in our org (we migrated from .NET Core 3.1 to Go back to .NET 6 recently).

Re:.NET 8 by Thaxll on Tuesday November 14, 2023 @11:39AM (#38265664)
Big difference is that Go is stable and conservative, net core keep adding a billion features every release. Looking at some net core 2/3 stuff and now to see how many things changed.

Good luck with your code base in 5 years when someone decide to add all the new stuff.

Re:.NET 8 by chrisandchris on Tuesday November 14, 2023 @12:02PM (#38266047)
I don't know Go that much, but the part about .Net is so untrue. First, C# was published in 2001, while Go was released in 2009. So there's 8 years of "more stuff".

Also (see in comments too), upgrading .Net is very easy. There are man not-to-small codebases can be "easily" upgraded from .Net Core 3 to 8 without any hassle. Backwards comptability was always baked into Microsofts thinking.

.Net 7 and 8 did also (IMHO) not contain that many groundbreaking features, just some "smaller" stuff.

Re:.NET 8 by Thaxll on Tuesday November 14, 2023 @02:45PM (#38268538)
Do you want to compare the number of features added between go and c# in the last 15 years? Just a single major release of C# added more stuff than probably the last 15 years of Go.

I'm not saying Go is 100% right in that, but it's much more conservative about stuff added into the language.

Re:.NET 8 by HackerThemAll on Tuesday November 14, 2023 @03:29PM (#38269264)
Of course, they conservatively added the most idiotic way of formatting dates as strings (while knowing other methods exist). And, while the whole bunch of other languages would call a method string.startsWith("a"), they use hasPrefix. This language is a mix of half-baked concepts and utter trolling. If I have to learn a lang with an awkward syntax, I'd prefer Rust, Julia, Erlang, Elixir or Haskell. Go is no-go. It's not even widely used at Google, its creator. So no, thanks.
Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @04:47PM (#38270261)
Also, why would force error returns without also including some sort of nice Monadic do-notation or Monad-inspired combinator syntax sugar in the 2020s? We've known for decades now how do that better.

I also think that Go looks like a practical joke that escaped some INTERCAL-like satire committee in the 1970s.

Re:.NET 8 by hollerith on Tuesday November 14, 2023 @04:55PM (#38270378)
You probably mean sum types and convenient syntax for testing and de-structuring sum types.
Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @05:32PM (#38270771)
No I specifically meant what is often called the Either or Result Monad. These are often implemented as Sum types, but they also follow the Monad laws and supports things like monadic binding/transformation/combination and benefit from syntax sugar like Haskell's "do-notation"/OCaML family's "computation expressions"/the "async/await" pattern of so many other languages now.

Good sum types destructuring would probably also be useful in more languages like Go, but many languages today provide "async/await" pattern syntax benefits without anything at all like "proper" sum types. Sum types are "merely" a possible implementation detail of the Monad and it's the Monad laws that empower some things beyond just sum types.

Re:.NET 8 by hollerith on Friday November 17, 2023 @01:10PM (#38307505)
Why pick on Golang, then? Rust doesn't have a monadic interface to side effects and "errors" either. Nor do the vast majority of the other newer languages.
Re:.NET 8 by WorldMaker on Friday November 17, 2023 @01:55PM (#38308210)
Rust uses a sum type for most errors (Result<T, Error>) and there are common macros such as "error-chain" that apply a monadic approach to binding/combining them (or chaining them, as the preferred nomenclature in that case).

Exception-based languages don't look monadic at first blush, they definitely aren't Sum types, but try/catch is one of the earliest and oldest of the monadic binding/combining approaches, even if it isn't often thought as such (and is barely considered more than goto/switch). It's far more obvious when you start to realize the intersection of async/await and try/catch is a working monad (and how that is reflected in Task/Promise monad instances).

Golang is the obvious odd one out where every other line of "best practice" code is `if err != nil` and the only other advice is "well you could just ignore errors". try/catch doesn't ignore errors, it just looks like it. Rust error chaining doesn't ignore errors, it just looks like it. Golang gives you the choice between micro-managing errors or BASIC-style "ON ERROR RESUME NEXT" and I cannot get anyone to convince me why this isn't either a practical joke or an intentional throwback to writing code like it is the 1970s all over again (even VB6 had better options than "ON ERROR RESUME NEXT", even if they maybe weren't used as often as they should be in some legacy 1990s/2000s codebases).

Re:.NET 8 by hollerith on Friday November 17, 2023 @08:31PM (#38313702)
>every other line of "best practice" code is `if err != nil` and the only other advice is "well you could just ignore errors".

You have a valid point there, but it hurts my ears a little for you to use the word "monadic" or "monad" to make the distinction between how the way Golang handles errors differs from how other modern language do it. To me, for a language to "have monads" requires the type system to give the programmer the ability to distinguish between a value type, e.g., an integer, and a computation that produce a value type. Haskell's type system for example uses `Integer` to refer to the former and, e.g., `IO Integer` to refer to that latter. And clearly by that definition, Rust and most other modern languages just don't have monads, i.e., don't have monadic types (and consequently don't support a monadic programming style) -- unless perhaps Rust's macro system can be used in some complex way to define the monadic-computational types, but I've never seen it used that way. BTW, I'd actually go further and say that to get the benefits of monadic style, the IO monad or whatever the language calls it must be the only way to perform side-effecting computations (though there is a little wiggle room on the definition of side effect here).

To be more precise, the terminology I prefer is that a monad (in the context of programming languages) is a type that obeys the 3 monad laws: https://wiki.haskell.org/Monad_laws. Although there are other ways besides a monad for the type system to distinguish between a value and a computation producing a value. Explicit continuation passing is one such way: whereas in Haskell you'd read a character from standard input with `main = getChar >>= \char -> do something with char`, in a language that uses explicit continuation passing, you'd write `main = getChar (\char -> do something with char)` where in this language getChar takes one argument, which happens to be a continuation argument. But all the languages I know about that let the programmer use the type system to distinguish between a value and a computation producing a value happened to use the monadic style to express that distinction (rather than something like explicit continuation passing) so I tend to use "monad" and "monadic" to refer both to the specific thing that obeys the 3 laws and for the deeper programming-language property.

Re:.NET 8 by WorldMaker on Friday November 17, 2023 @10:33PM (#38314749)
I suppose one of the biggest parts of confusion here is that I'm mostly referring to the monadic programming here in the perspective of the compile-time representations inside of a compiler rather than in the exposed type systems of the languages that they compile. A compile-time representation of computation is a type that represents computation. Not every compiler author themselves think of their work as monads and build them in a way that follows the monad laws/use monad operators directly either, but the overlap should be obvious and a lot of classic and modern compile-time transformations (generators, try/catch, async/await) can be thought of as monadic transformers transforming from one class of monad to another whether or not they are actually implemented that way.

That's one level of confusion in this conversation so far. However, the other problem is that monads don't just mean "computation". (Arguably the Lambda Calculus is way closer to the metal and more accurate to describe as the abstraction of "computation".)

Monads are useful for describing "computations as values" but that's not what the abstraction is entirely for and thinking of monads only as "computations" is how you fall into the easy mistake to make that IO in Haskell is the only "real" monad. There are lots of monads in the wild (Maybe, Either, Promise, List, ...), some of which don't really describe computation at all. We love to mock it, but the technical definition of a monad is "a monoid in the category of endofunctors"; nothing about that is "computation" specifically. Computation is a handy shorthand, of course, but its confusing one of the trees for the rest of the forest sort of thing, mostly because Haskell's IO was the first time monad escaped as a term of art for the deep abstraction that it is.

There is an importance to the monad laws and the two monad "operators", more importance than "computation" as a shorthand for thinking about monads. These operators are called "multiplication" and "identity" in raw Category Theory, but in programming "identity" is usually called "return" and "multiplication" is often called "bind", "bind" is interesting because it also has a dual generally called "join" and "join" is sometimes called "flatMap" or "SelectMany". (Yes, that does point out that most list structures in every modern programming language provide monad operators and obey the monad laws. Lists are a monad.)

A dumber, better shorthand for monads may be "glueable". Monads bind things together in a way that two binds of the same type of monad results in just one monad. (flatMap two lists together and get one list back.) The power of monads is that you can keep gluing things together. Whether by "executing side effects" in a "computation runtime" like the stalwart IO monad or in all the "boring" ways of Lists and Promises and Maybe and Either (that mostly have nothing to do with "computations", except Promises, sort of). The big useful bit is that the Monad laws imply that you can do all this "gluing" in a stable way. That stable way also makes room for the means to transform from one type of Monad to another (Monadic transformers).

Monadic transformers are where some of the real power of the IO monad as an abstraction lives (and other monads in terms of compile-time representations): the idea that the "notation" doesn't matter so much as the end "glued" result. Imperative looking do-notation is the same sort of "glue" as a lot of individual calls to the Monad operators bind and return, transforming from one form to the other is "relatively" "trivial" because the Monad laws say everything should be fine.

There is a usefulness to the IO Monad in Haskell and it is an interesting way to "describe side effects to perform", but the whole of monads and monadic binding is a lot more than just the IO Monad and if you are defining monads to only mean "the IO Monad" you are missing some of their other usefulness.

Re:.NET 8 by hollerith on Tuesday November 21, 2023 @02:58PM (#38369198)
>if you are defining monads to only mean "the IO Monad"

Show me one place in my writings where I imply that the IO monad (or state monads generally) is the only monad.

Re:.NET 8 by jen20 on Tuesday November 14, 2023 @05:34PM (#38270801)
The real problem was upgrading from .NET Framework, or Mono, to .NET Core, which has been stable since.

That comparison is not a fair comparison to Go, which has a much stricter guarantee around source and library compatibility within the 1.x series.

Re:.NET 8 by Capricorn2481 on Tuesday November 14, 2023 @12:07PM (#38266105)
People can write dumb, inconsistent code anywhere. A stable library will not protect you from a lack of PR reviews
Re:.NET 8 by pjmlp on Tuesday November 14, 2023 @12:08PM (#38266121)
Thankfully .NET folks are confident that their audience has the skills to manage those features.
Re:.NET 8 by The_Colonel on Tuesday November 14, 2023 @12:12PM (#38266192)
.NET / C# seems to be following C++ by including... everything. I wonder if they're just not worried about feature bloat or what's their thinking...
Re:.NET 8 by Metasyntactic on Tuesday November 14, 2023 @12:49PM (#38266765)
Hi there, C# Lang Designer here. :)

We're always thinking about the bloat concern when it comes to language development. However, our philosophy on it is that bloat primarily comes when you add replacement systems that are expected to supersede the previous mechanisms, not compliment them. So we try to do the former sparingly. In the history of C# there are very few times we've actually done this, and we do view those times as unfortunate cases where we likely rushed a feature too early and then regret having to live with those features forever.

To help combat this, we tend to go through long periods of design and experimentation, where we propose features, create prototypes of them, and then interact with a large set of diverse community groups to try things out. The feedback from this is tightly bound into our design process and allows us to refine (or even jettison) designs rapidly.

We also normally will both break up work into lots of smaller pieces (composing large language changes into small orthogonal, complimentary, composable blocks), and do designs over many years if appropriate. We think this approach has helped us create a language that is 25 years old, while being both very rich, and still very cohesive. There are a few mistakes we've made along the way ("anonymous-delegates", i'm looking at you), but we're very happy that our ratios here are very good given our continued investment in this space.

Re:.NET 8 by terandle on Tuesday November 14, 2023 @02:50PM (#38268633)
The new array literals seem to supersede some previous syntaxes like new[] { 1, 2, 3 } goes to [1, 2, 3] in a lot of cases. But overall they are a _great_ addition to the language playing around with them now so bravo.

Still not really sure how I feel about class primary constructors on the other hand, will give them some time to marinate.

Re:.NET 8 by oaiey on Tuesday November 14, 2023 @03:19PM (#38269099)
Share the exactly same worries. Let us see.
Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @04:54PM (#38270374)
Having moved to writing records by default in many places such as models and "DTOs", primary constructors are a very useful "transition" tool in those cases of "this started as a record, but now needs to be a mutable class for X reasons" and means a little bit less code to entirely rewrite in the first pass. It's also useful for even just "I aesthetically like for my class 'View Models' to mirror their record 'Model' definitions a little closer".
Re:.NET 8 by Smaug123 on Tuesday November 14, 2023 @05:45PM (#38270900)
Class primary constructors have always been the default thing in F#, and I found it deeply annoying not to have them whenever I had to write C#, for what it's worth!
Re:.NET 8 by zengid on Tuesday November 14, 2023 @01:29PM (#38267392)
C# has been able to add new features while simultaneously making the syntax more ergonomic and elegant, while C++ hasn't.
Re:.NET 8 by Kwpolska on Tuesday November 14, 2023 @12:17PM (#38266251)
.NET is stable, they very rarely remove things. Code written for .NET Framework 2.x will probably work fine on .NET 8 (unless it uses the things that didn't make the jump, like WCF, but there are libraries that provide SOAP support.)

Can a single developer remember all of .NET? No, but that applies to most languages/ecosystems. But if you encounter something you've never seen, you can always check the docs.

And the thing hasn't been named ".NET Core" for 4 consecutive releases now.

Re:.NET 8 by merb on Tuesday November 14, 2023 @12:29PM (#38266452)
Actually most wcf code does run on .net 7+ they open sourced it into corewcf. (At least a lot of the things) Webforms however is dead.
Re:.NET 8 by starik36 on Tuesday November 14, 2023 @12:31PM (#38266501)
> Code written for .NET Framework 2.x will probably work fine on .NET 8

WebForms would like a word.

Re:.NET 8 by Kwpolska on Tuesday November 14, 2023 @03:23PM (#38269180)
Hence “probably”. WebForms should die in a dumpster fire.
Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @04:48PM (#38270289)
I worry that Blazor is that dumpster fire sometimes.
Re:.NET 8 by custard42 on Tuesday November 14, 2023 @08:24PM (#38272222)
I'm curious, why do you say that?
Re:.NET 8 by WorldMaker on Wednesday November 15, 2023 @11:07AM (#38278226)
The mixture of client-side and server-side code that Blazor can allow in the same files gives me a very gut instinct feeling that "those who have forgotten the WebForms history, or worse the ASP Classic history, are doomed to repeat it". It's obviously different from both WebForms and ASP Classic and its use of Wasm is certainly a brand new idea that WebForms only wishes it had access to. It seems like a brand new mistake to me, because I still remember debugging ASP Classic and WebForms and Silverlight and "now even the client side JS of ~~WebForms~~ Blazor is no longer JS but a mini-.NET runtime in a Wasm box" doesn't sound like a good time in the long term maintenance future to me when Blazor apps become legacy apps. But some of that gut instinct may just be cynicism at this point.
Re:.NET 8 by papichulo2023 on Tuesday November 14, 2023 @12:47PM (#38266737)
Ehh, that is the thing about Go, most Go developers know most of the std (compared to other languages at least)
Re:.NET 8 by haolez on Tuesday November 14, 2023 @11:38AM (#38265652)
At least until it gains an immense market share and Microsoft starts monetizing it again. They've already tried in .NET Core 7, no? I'm staying away for now.
Re:.NET 8 by endianswap on Tuesday November 14, 2023 @11:47AM (#38265799)
Can you share any details about .NET Core 7's monetization? I couldn't find anything on Google.
Re:.NET 8 by 9cb14c1ec0 on Tuesday November 14, 2023 @11:54AM (#38265920)
It's all open source and free, on Github. I've used .NET for about 10 years now, and the only money it has cost me is a few third party libraries that I couldn't find good open source competitors for.
Re:.NET 8 by haolez on Tuesday November 14, 2023 @12:43PM (#38266668)
But you've never seen it with a market share of more than 90%, which could happen eventually. It's a matter of incentives and those play against you.
Re:.NET 8 by Salgat on Tuesday November 14, 2023 @04:48PM (#38270279)
Microsoft owns the .NET trademark but the language and source code for the current runtime is freely forkable and usable by any person/company who wants to do their own implementation. It's no different than the situation with Oracle and Java.
Re:.NET 8 by haolez on Tuesday November 14, 2023 @07:38PM (#38271871)
That's actually a very good point. I'll rethink my position.
Re:.NET 8 by mdasen on Tuesday November 14, 2023 @12:39PM (#38266617)
I don't agree with the person's suspicions, but I can speak to your question.

If you're making over $1M/year or have more than 250 employees, you have to pay for Visual Studio or the C# DevKit in VS Code. Microsoft has been taking the open-core of VS Code and putting proprietary extensions into it. However, this isn't just C#. Microsoft has also replaced the open-source Python extension with something closed source.

There is an alternative to Microsoft's tooling with JetBrains' Rider. Rider is pretty amazing. It's much higher quality than any of the other JetBrains tools and part of that is that the .NET ecosystem is really amenable to tooling (and paying for tooling) and that JetBrains had been creating ReSharper for Visual Studio for a long time (so they already had all the .NET intelligence built out).

There was a thing where Microsoft was going to remove hot-reload from the dotnet CLI tool and make it only available in Visual Studio. I kinda felt like some of this was motivated by timing more than strategy, though. The CLI's hot reload had some rough edges and .NET has corporate style release dates with fanfare like .NET Conf. But the .NET hot-reload is quite excellent. Most edits can be hot reloaded and you can set it to simply re-compile and re-run for the ones that can't hot reload (and it just takes a couple seconds). It's dead simple to use and works (and the amount of time I've wasted to get hot reloading in Java is just incredible).

Really, every ecosystem tries to find some way to monetize. The creator of Elm has a great talk on this: https://www.youtube.com/watch?v=XZ3w_jec1v8.

Microsoft's monetization feels reasonably benign to me. If I'm bringing in $1M/year or have 250 employees, I can pay $500/year/engineer (or maybe less with volume or annual licensing; or $250-420/year/engineer for Rider for an organizational license). Sure, there are costs, but it's not like $500 is that interesting if I'm paying engineers $150,000/year. Likewise, Microsoft likes .NET as a bit of a halo project to get people into Azure. I don't use Azure at all and there aren't really Azure specific features, but in the same way that the iPod/iPhone brought a lot of people to the Mac, .NET probably brings some people to Azure. Even if you're a developer that knows better, you might have someone in your org who thinks "oh, it makes sense to deploy with Microsoft if we're developing with Microsoft." There's a lot of money up for grabs from that thinking. It likely also drives sales of things like Microsoft SQL Server. .NET works great with PostgreSQL or SQLite (and I'd assume MySQL as well, but I haven't used it), but I'm sure plenty of organizations pay for MS SQL Server with the "why not all from Microsoft" thinking.

So yes, Microsoft isn't looking for zero monetization, but the IDE license fees don't seem like a problem - either you're small enough that it doesn't matter or you're large enough that the fee is small. The rest of it is just stuff I can ignore (Azure, MS SQL Server).

But Microsoft's money often comes with some nice things. There's good documentation, a lot of great improvements each year, lots of great video sessions, and some truly amazing blog posts. .NET really has some amazing blog posts - and part of that is that Microsoft gives people the time to create some really high-quality content. If you haven't watched the Elm video I linked above, I highly recommend. It really talks about a lot of the things that money brings to a community. .NET comes with a lot of polish - more than I've seen in any other ecosystem and I've been programming a long time (and I've never been a Windows user).

If the cost of a healthy ecosystem is that companies with enough money to pay a few hundred dollars a year have to kick in a little support, I'm good with that. If I create something that starts bringing in $1M/year, I think it's reasonable to think I should kick in some money. I also understand others who don't like that - especially since it's kicking in money to Microsoft, not to some non-profit community foundation. But .NET feels practical to me. The money in the ecosystem means that a lot of high-quality stuff gets produced.

Re:.NET 8 by neonsunset on Tuesday November 14, 2023 @01:12PM (#38267119)
(perhaps downvoted by those who never had to face with realities of running OSS projects or otherwise)
Re:.NET 8 by CoolCold on Thursday November 16, 2023 @10:31AM (#38290765)
Do you have some experience here? Mind sharing couple of examples - I'm quite curious
Re:.NET 8 by haolez on Tuesday November 14, 2023 @11:54AM (#38265917)
I think it was related to tooling. Something about hot reloading. Can't remember the details.
Re:.NET 8 by Smaug123 on Tuesday November 14, 2023 @12:01PM (#38266036)
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @11:48AM (#38265807)
.NET 7? There was no monetizing in it. If you want to look somewhere, look at the C# DevKit for VS Code.
Re:.NET 8 by dragonwriter on Tuesday November 14, 2023 @12:00PM (#38266008)
There is no such thing as .NET Core 7, “Core” was a temporary distinction when the Windows-only . NET Framework was still being actively developed, retired with the consolidation to a single .NET with .NET 5.

If you got .NET Core 7 somewhere, I’m sure it is monetized: that's often the point of a scam.

Re:.NET 8 by haolez on Tuesday November 14, 2023 @12:16PM (#38266238)
The user is not to blame for the confusing naming that the platform owner chooses.
Re:.NET 8 by pjmlp on Tuesday November 14, 2023 @04:39PM (#38270163)
As someone that knows .NET since it was only available to MSFT partners, I find quite valuable the Core and Framework suffixes, especially when discussing with people not versed in the .NET history, as many people get confused why .NET 4 isn't compatible with .NET 7 for example.
Re:.NET 8 by SideburnsOfDoom on Wednesday November 15, 2023 @03:53AM (#38274654)
Microsoft's main monetization strategy is to get people to run their code on the Azure cloud.

If it means running code in any lang, on a linux vm in Azure, so be it.

If it means giving away dotnet, so be it.

If it means that dotnet on AWS is also popular, so be it.

They're pretty clear and open about that, you don't have to look for hidden motives.

Re:.NET 8 by davewritescode on Tuesday November 14, 2023 @11:38AM (#38265649)
I just starting using .NET professionally very recently and coming from Go and Java a lot of the .NET platform is just downright pleasant.
Re:.NET 8 by menacingly on Tuesday November 14, 2023 @11:29AM (#38265493)
With consistent, reasonable-by-default threading abstractions baked in
Re:.NET 8 by bmitc on Tuesday November 14, 2023 @11:39AM (#38265656)
Are those new? What are they by name?
Re:.NET 8 by leosanchez on Tuesday November 14, 2023 @11:50AM (#38265847)
I think the parent comment is talking about System.Threading.Tasks.

I might be wrong though.

Re:.NET 8 by bmitc on Tuesday November 14, 2023 @11:54AM (#38265918)
Oh, I see. I was hoping for something new. I keep on hoping some sort of BEAM-like (from Erlang) process gets added to .NET.
Re:.NET 8 by valcron1000 on Tuesday November 14, 2023 @12:37PM (#38266589)
It was tried and the dotnet team decided to drop it: https://github.com/dotnet/runtimelab/issues/2398
Re:.NET 8 by custard42 on Tuesday November 14, 2023 @01:46PM (#38267640)
Re:.NET 8 by menacingly on Tuesday November 14, 2023 @12:06PM (#38266090)
I have considered the that, but I ultimately decided they work because they are a fabric of what that ecosystem _is_, not what it has.

It's the same reason two sites that are more or less the same will have entirely different communities. There isn't any reason you couldn't implement the one on the other, but it's not in the core substance.

Re:.NET 8 by zengid on Tuesday November 14, 2023 @01:26PM (#38267350)
Re:.NET 8 by bmitc on Tuesday November 14, 2023 @03:22PM (#38269155)
Orleans is definitely interesting, but I have never looked into it much because it's my understanding that it is a cloud-only solution, in that it requires some Orleans or Azure service. Is that correct?
Re:.NET 8 by jen20 on Tuesday November 14, 2023 @03:55PM (#38269625)
No, you can run in standard processes - there's even documentation [1] about hosting it in Kubernetes.

[1]: https://learn.microsoft.com/en-us/dotnet/orleans/deployment/...

Re:.NET 8 by Rapzid on Tuesday November 14, 2023 @06:06PM (#38271103)
Further to the other reply you can run it alongside asp.net; one process can be an Orleans node and and an asp.net server.
Re:.NET 8 by neonsunset on Tuesday November 14, 2023 @11:53AM (#38265903)
.NET has had first-class parallelism and async/await since around .NET Framework 4.0 release which was...13 years ago huh. There have been many improvements in the underlying runtime since then though.

A garden variety of keywords is async/await, TPL (tasks/futures and structured concurrency) and PLINQ (Rust's Rayon).

Re:.NET 8 by orra on Tuesday November 14, 2023 @03:31PM (#38269295)
You're right the basic support's been around a long time. However, originally you always had to use Task methods. The pleasant async/await keywords didn't arrive until C# 5.0, in 2012.

Admittedly that's also a long time ago.

Re:.NET 8 by WorldMaker on Tuesday November 14, 2023 @04:40PM (#38270192)
In addition to the base TPL (System.Threading.Tasks), IAsyncEnumerable<T> in recent .NET versions has deepened and simplified even more useful concurrency patterns (Async Generators), especially when paired with Ix.NET (System.Interactive.Async) which adds a lot more LINQ/PLINQ operators, many of which are designed to intentionally mirror ReactiveX.NET (System.Reactive), the even older but just as useful push-based (IObservable) relative of IAsyncObservable.
Re:.NET 8 by geitir on Tuesday November 14, 2023 @11:30AM (#38265499)
Wow that’s a lot of busy work
Re:.NET 8 by gettodachoppa on Tuesday November 14, 2023 @12:11PM (#38266164)
> .NET has been held down by the image of its early days, but it has become a pure joy to work with recently

People have been saying that for the past 4 years.

As someone who's never used .NET but develops embedded apps for Linux, I had high hopes for it become the best story for crossplatform development, it still feels like the crossplatform is held by ductape. It's still Xamarin for mobile, Avalonia (a 1-man project) for desktop Linux as the only choice, 2 confusing different UI frameworks (WinUI vs MAUI). They don't take this as seriously as I'd hoped.

When they made it open-source and cross-platform 6-7 years ago, they should've thrown enough manpower that within 3 years (or even 2, this is Microsoft with endless coffers) it was unquestionably the best development option for nearly every scenario.

Additionally, it's my understanding they don't release proper debuggers on Linux? I'm not gonna install Visual Studio just to debug my .NET app bro.

Re:.NET 8 by neonsunset on Tuesday November 14, 2023 @12:21PM (#38266322)
When it comes to the OSS aspect itself, debugging experience is not the strongest suit but if you overlook it - both Linux and macOS are very well supported by either VS Code / or any other LSP compatible editor + Omnisharp (or DevKit nowadays I guess?) or Rider (which is commercial but is often even better than Visual Studio, definitely faster too).
Re:.NET 8 by desi_ninja on Tuesday November 14, 2023 @12:35PM (#38266551)
MAUI is built using WinUI. It is same platform.
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @03:06PM (#38268899)
Maui is built on top of winui, Android ui and iOS UI. It just looks like WPF, which again influenced winui
Re:.NET 8 by mjevans on Tuesday November 14, 2023 @12:45PM (#38266706)
Windowing and Widgets; those are the two things that always seem to be the biggest issue for cross-platform apps that should be trivial if the groundwork were in place.

I solidly blame MS for shipping something like 10+ of their own frameworks and never E.G. including QT or anything else open. Apple's just as bad, if not actively worse, for relegating even open 3D modeling languages to second class.

Re:.NET 8 by GordonS on Tuesday November 14, 2023 @12:55PM (#38266861)
> I had high hopes for it become the best story for crossplatform development, it still feels like the crossplatform is held by ductape.

Sorry to be pedantic, but it's cross-platform GUI that still doesn't have a good, officially supported story.

For non-GUI apps, cross-platform works very well! I've deployed a range of apps to production across Windows, Linux (both x64 and ARM), and Docker on Linux too (also both x64 and ARM) with great success.

I'd like to see an officially supported build for BSD, but that's about my only cross-platform want.

Re:.NET 8 by majora2007 on Tuesday November 14, 2023 @01:52PM (#38267731)
I just saw in the dotnet-labs project they've been building FreeBSD support.

https://github.com/dotnet/runtimelab/tree/feature/FreeBSD

Re:.NET 8 by Const-me on Tuesday November 14, 2023 @05:21PM (#38270647)
> cross-platform GUI that still doesn't have a good, officially supported story

Yeah, but in the meantime there’re decent unofficial options. Once I compiled NanoVG into a DLL, consumed with C#, and implemented rich GUI on top of that. Worked pretty good overall. Eventually I’ve patched NanoVG for optimal font quality on low resolution touch screen of my target Linux device: https://github.com/Const-me/nanovg

Re:.NET 8 by GordonS on Wednesday November 15, 2023 @05:38AM (#38275270)
Interesting, I haven't come across NanoVG before!
Re:.NET 8 by Const-me on Wednesday November 15, 2023 @06:45AM (#38275688)
NanoVG is a 2D rendering library built directly on top of OpenGL or GLES.

Modern rich GUI needs much more than a renderer, but amount and development cost of that “much more” varies depending on GUI complexity. The device I developed is rather simple: low resolution screen, touch is the only input, English localization only, that’s how I was able to deliver in reasonable time.

For more complicated GUI I’d look for different technologies. Maybe QT, despite the high price.

Re:.NET 8 by jug on Friday November 24, 2023 @08:15AM (#38403655)
I think it is looking more and more like the established, de facto cross-platform GUI is a web page, embedded into some framework or not. And this is the general wind direction, not just on .NET platform alone.

People say cruft but sometimes I wonder how much more cruft it really is when you use the system browser rather than an embedded web browser. Usually many shared resources for it are already loaded into RAM.

If the end result is something like MAUI, I much rather just use a web page.

Re:.NET 8 by jcpst on Tuesday November 14, 2023 @01:06PM (#38267034)
Maybe the desktop UI story isn’t quite there yet. But I’ve been using .NET >= 5 web apps for years on linux, and it’s pretty solid with Rider. No issues debugging.

While I would prefer if I could use free tooling, Rider pays for itself in time savings very quickly.

Re:.NET 8 by mdasen on Tuesday November 14, 2023 @01:16PM (#38267180)
I think that it takes many years to change a reputation - more than 4. A lot of devs don't like learning new things and they would have gotten deep into a different ecosystem before .NET was really open source.

You note that they open sourced it 7 years ago, but the original .NET Core was kinda an experiment. Microsoft didn't quite seem to know where they'd ultimately go with it. I think Microsoft really committed to it in 2018 or 2019. I think you also might have unrealistic expectations of how quickly things can be accomplished. Flutter is over 6 years old and still feels a bit mediocre to me - and I think Flutter is trying to solve a simpler problem since it isn't using native widgets.

For cross-platform UI, I think there is some disappointment in the .NET community. MAUI has succeeded Xamarin (except for Linux), but I think your sentiment that Microsoft isn't investing in it enough is shared by many in the community.

I think the problem is that Microsoft bit off more than it can chew with MAUI. Avalonia, Flutter, Compose Multiplatform, Electron, etc. tend to just paint non-native widgets via Skia or JS/HTML. With MAUI, Microsoft is offering actual native interfaces which means having to deal with a lot of platform differences to implement that rather than just painting their own widgets with a graphics library.

I'm not trying to talk you out of being disappointed with MAUI. It has been disappointing. However, I'm still hopeful for it simply because it's the only effort I see trying to offer a native cross-platform UI dev experience. Flutter, Avalonia, Compose Multiplatform, etc. are all saying "We'll just take a window and paint our stuff in it. Do you really care about an app feeling native?" It isn't always important, but it does feel like so many given up on native apps.

I'm hopeful that MAUI will keep getting better (as it has been) and that we'll have the opportunity for a native UI experience in the future.

Re:.NET 8 by theshrike79 on Tuesday November 14, 2023 @01:52PM (#38267726)
This is not a .NET problem.

There really isn't a simple way to do cross platform (Windows/Linux/macOS) UIs with any language. The least bad option is to make it a web page, maybe wrap it with Electron.

Re:.NET 8 by oaiey on Tuesday November 14, 2023 @03:04PM (#38268859)
Yeah, but MAUI is basically react native, Blazor on Maui basically Cordova/electron (just with much better plugin support) and Maui also had once some support for rendered control.

While I agree it is hard, there is no one who could rule this space better than .NET if they just would like.

Problem is: this is developer division funding which is not the Windows (which owns a UI stack) or office division (react native actually). DevDiv previous UI toolkits WPF was loved but then abondon because of the duplicity of UI toolkits in Microsoft.

Re:.NET 8 by gettodachoppa on Tuesday November 14, 2023 @03:06PM (#38268902)
It doesn't need to be 100% perfect. Just 99%. Don't let perfect be the enemy of great.

I write Qt GUIs for Linux+Windows, and no Windows user can tell it's not "native" (not that there's a native Windows look anymore, what with MS being schizophrenic about scrapping the UI framework and starting a new one everytime a new PM wants attention, only the classic widget look associated with Windows is still the 2000/XP/7 is recognizable).

Qt apps are super performant, and write once, run anywhere for 99% of GUIs anyone wants to create.

OSX users might be the only one that complain, but they're a tiny minority of users, and it's good enough in most cases, with fantastic performance to shut up the doubters.

Electron apps are hideous, bloated, and slow, relative to the Qt apps I write. I'm only held back by C++ being a shitty archaic language/ecosystem, and if .NET offered an alternative I'd jump ship immediately, that's why I'm so disappointed it's an afterthought.

P.S. Languages designed for "hypertext markup" are not meant to create rich UIs, and can never compete with a native framework. Everything in the JS world to create rich applications is a hack and you can see it in the code and the endless churn of frameworks. When I write something like QML, the intent is clear. When I look at the JS UI frameworks people are hacking hideous HTML templates and conditional logic, list iteration, etc in HTML templates. And nearly every JS UI framework project is written by 1-2 intermediate devs with comparatively little API design talent, who inevitably break backwards compatibility within a year or two.

Re:.NET 8 by theshrike79 on Thursday November 16, 2023 @05:02AM (#38287635)
Yea, I did some Qt work in ye olden times and it's a pretty good system, although it does have its own warts mostly due to being literally older than anything else. =)

I might need to look into it once more, at least it won't run out of steam the second I want to do something else than have a standard text box or an input field on the screen - like all those "easy ui" -systems do every time.

Re:.NET 8 by jug on Friday November 24, 2023 @08:19AM (#38403691)
Maybe Eto.Forms on .NET if you want to go native controls and simple for Windows, Linux, macOS: https://github.com/picoe/Eto

It's not from Microsoft but who cares. They don't have a reputation of holding onto new UI frameworks anyway.

Re:.NET 8 by tomcam on Tuesday November 14, 2023 @04:18PM (#38269937)
Livecode does the cross platform thing
Re:.NET 8 by oaiey on Tuesday November 14, 2023 @02:57PM (#38268751)
I would love that they support a framebuffer (rendered controls) or Linux native control rendering in Maui for exactly that reason. But no, QT continues it's painful reign.
Re:.NET 8 by whoknowsidont on Tuesday November 14, 2023 @09:58PM (#38272795)
>.NET has been held down by the image of its early days,

I have been in .NET since 2009. I don't what would lead anyone to replace Go with .NET? That seems like it's asking for a lot of problems you previously did not have.

Can you expound on your decision?