Live data from Hacker News

Welcome to C# 9.0

devblogs.microsoft.com

81–90 of 196 posts

Re: Welcome to C# 9.0

#81
post #8

Earlier quoted context omitted.

C# is Microsoft Research's 20-year-long con to turn Java programmers into OCaml programmers so slowly that they don't notice.

This made me chuckle. I think it's broader than C# -> F# though. Java also has closures and higher-order functions, and in many debates on this forum it seems like OOP proponents aren't aware that these features are grafts from functional programming. OOP programmers also seem to have (finally) come around to the consensus that composition is preferable to inheritance. So if there is a long con, I think it is about t…

> these features are grafts from functional programming

Except that Smalltalk -for which the term "object oriented" was invented - had them.

https://www.infoq.com/presentations/functional-pros-cons/

Re: Welcome to C# 9.0

#82

Positional records are a terrible idea, one of the best things about C# is readability var (f, l) = person; is so much worse than var (f, l) = (person.FirstName, person.LastName); I don't want to have to refer to documentation or class implementation to understand what a destructuring expression does.

Your example would seem a lot less bad without the one character variable names.

    var (first, last) = person;
didn't seem too bad to me.

Re: Welcome to C# 9.0

#83

I still think C# is one of, if not the best of designed languages exist. Even it moves in much smaller steps than it was before I think it's for good. I left .NET land at 6.0 and .NET 4.x versions mostly because of Windows eco-system (small open source community, almost no alternatives to out of the MS things, bad linux support). Since that I've been working with Java, Swift,JS, Python, Golang and I still think that…

It's by far my favorite general purpose language. Works well everywhere, and the best tools around.

> Works well everywhere

Perhaps it's gotten better - TBH I haven't checked in years - but it used to be a horrible bug ridden mess for doing things aimed at Linux (i.e. via mono).

Re: Welcome to C# 9.0

#84
post #61

Look - I don't have anything deep to say here. I can only say that between 'records' and 'with-expressions' now in C#, I as a hobbyist F# developer feel like I'm being shaken down by the mafia. C# designers: "Hey, nice language features you have there. I'll just borrow them for a bit ok, it'll be fine..." Later, C# programmers: "why would I learn F#, C# does all the same stuff!" (even though it doesn't) Edit: I admit…

But there's clean interop with C#, right? If it helps C#/.NET libraries get made, I think its a positive thing for C# and F#.

Re: Welcome to C# 9.0

#85
What is an example of a really good codebase written in modern C#?

There are quite a few appealing things about the language, but I'm having trouble shaking the feeling that it's kind of like Java. I know both languages have evolved a lot, but some codebases might get stuck in some old patterns.

Re: Welcome to C# 9.0

#86
post #77
post #68

Earlier quoted context omitted.

Well F# obviosly never gained enough momentum and C# has to grow somewhere so why not in this direction. All "big" languages are gaining more and more functional and declarative features each version. I always remember this chat by Simon PJ, the "father" of Haskell about convergence of languages in features https://m.youtube.com/watch?v=iSmkqocn0oQ

> Well F# obviosly never gained enough momentum As a member of the F# Evangelism Strike Force (to use an n-gate ism), I want to argue this point but there is not enough info to determine what 'enough momentum' means. I can produce, without leaving F#: libraries, cli apps, windows services, windows desktop apps, websites (asp.net core + giraffe), web apps, SPAs (SAFE stack), and more. If I target .NET Core, I can run…

It is called Go.

Re: Welcome to C# 9.0

#87
post #75

I still think C# is one of, if not the best of designed languages exist. Even it moves in much smaller steps than it was before I think it's for good. I left .NET land at 6.0 and .NET 4.x versions mostly because of Windows eco-system (small open source community, almost no alternatives to out of the MS things, bad linux support). Since that I've been working with Java, Swift,JS, Python, Golang and I still think that…

Didn't C# start with Microsoft poaching the lead Delphi architect from Borland? A lot of people loved Delphi back in the day for its design too.

Actually Borland's management helped quite a bit believing some Anders interviews.

Re: Welcome to C# 9.0

#88

What is the winforms simple (ie, drag and drop form designer, click through for code) current windows development recommendation. I've seriously lost all track of how to just get up and going. I've tried UWP/WPF etc - they felt like a bit of nightmare for quick and go, but the tooling now seems to have dropped winforms? I couldn't get the form designer to actually show up even on a WinForms project?

I still love Windows Forms and the designer. Sometimes some solutions are a bit hacky and the designer can do really weird stuff, but I can manage. I think, the standardized look and feel really works well for complex business applications.

WPF is nice for fully customized UI where you want your application to look modern, but xaml can really be daunting. And it's not only xaml, but that whole MVVM thing can be a nightmare to teach and stick to in a large team and project. Moreover you probably need some designers or an external company to design your UI's to really shine.

I would keep a close eye on MAUI [1] and where it will go. The Model-View-Update (MVU) pattern looks interesting and the cross platform aspect could be really nice.

[1] https://devblogs.microsoft.com/dotnet/introducing-net-multi-...

Re: Welcome to C# 9.0

#89

Earlier quoted context omitted.

It's by far my favorite general purpose language. Works well everywhere, and the best tools around.

> Works well everywhere Perhaps it's gotten better - TBH I haven't checked in years - but it used to be a horrible bug ridden mess for doing things aimed at Linux (i.e. via mono).

Well now you use .NET Core and it works flawlessly :-)

Re: Welcome to C# 9.0

#90

Earlier quoted context omitted.

It has the benefit of 15 years more hindsight. As an example, during this time the development community figured out that using immutability as the default brings benefits. Kotlin is designed with this in mind, but C# isn't - e.g. C# has this cool feature for object initialization which is so handy and all developers use it. Except for - it doesn't work with immutable classes (the ones with readonly fields). As an ef…

> Except for - it doesn't work with immutable classes (the ones with readonly fields). Well good thing they're adding that in C# 9 then

Oh, cool, I didn't notice that!

Still, they are playing catch-up here.

Post reply on HN