Good luck with your code base in 5 years when someone decide to add all the new 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.
I'm not saying Go is 100% right in that, but it's much more conservative about stuff added into the language.
I also think that Go looks like a practical joke that escaped some INTERCAL-like satire committee in the 1970s.
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.
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).
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.
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.
Show me one place in my writings where I imply that the IO monad (or state monads generally) is the only monad.
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.
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.
Still not really sure how I feel about class primary constructors on the other hand, will give them some time to marinate.
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.
WebForms would like a word.
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.
If you got .NET Core 7 somewhere, I’m sure it is monetized: that's often the point of a scam.
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.
I might be wrong though.
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.
[1]: https://learn.microsoft.com/en-us/dotnet/orleans/deployment/...
A garden variety of keywords is async/await, TPL (tasks/futures and structured concurrency) and PLINQ (Rust's Rayon).
Admittedly that's also a long time ago.
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.
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.
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.
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
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.
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.
While I would prefer if I could use free tooling, Rider pays for itself in time savings very quickly.
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.
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.
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.
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.
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.
It's not from Microsoft but who cares. They don't have a reputation of holding onto new UI frameworks anyway.
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?
.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).