Live data from Hacker News

Welcome to C# 9.0

devblogs.microsoft.com

101–110 of 196 posts

Re: Welcome to C# 9.0

#101
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…

A language could be declaered good enough but none of the popular languages are there. They all had plenty of "bad but popular" design decisions at the beginning and now they are trying to compensate. What I hate is the constant repeating of everything. I'd rather one language have everything crammed in and we get to choose what we want and what we don't want. No "good" (my opinion) language will ever have only "one way of doing things" so why not just add everything and get over with it. In any case, all the "big" languages seem to be racing to "add everything" anyways.

IMHO my biggest issue with languages like F# and Haskell is like you mentioned the lack of tooling. I can even get over the fact that the ecosystem is smaller but the lack of ergonomics (things are harder to do, there's more friction in the dev process) always sends me back to C#. I wish F# tried to get into Roslyn instead of having their own compiler. I get the prestige and practicality of doing your own thing but I think it costed them a lot of missed out features and polish. I'm not that familiar with F#. It very well could be the language is too different to reuse almost anything from the semantic part of Roslyn but there's still so much else there they could get for free

Re: Welcome to C# 9.0

#102
post #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#.

There is. I have done F#/C# interop before.

Re: Welcome to C# 9.0

#103
post #17

How does the .NET ecosystem fare these days compared to Java's? Whatever the differences between the languages, on the surface of things it looks like one must be insane not to use Java: https://projects.apache.org/projects.html?language

I think this is a valid point, two projects I'm making heavy use of are both ScyllaDB and Apache Beam. Neither have C# as a supported language.

Many big projects roll out drivers for the JVM (Java/Scala/Kotlin compatible), Python, and Go first. I agree that C# is a 'nicer language' than Java, but at this point, that doesn't make up for the lack of ecosystem.

Re: Welcome to C# 9.0

#104
post #41

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 about trade off. A language that keep getting new features every year, will make some users happy, but will lose compiler speed and it will be harder to learn.

I love C# and have used it since the beginning (my online handles are often VisualCSharp), but I do worry about the cognitive burden of remembering idioms and dealing with multiple ways to do the same thing. This is already a huge issue with C++, and now it's slowly happening to C#. I work with many, many developers--some overseas--that are still in the string.Format era. The language is starting to show some warts due to inheriting bad decisions from former language maintainers (e.g., nullable value types and nullable reference types being treated completely differently).

I hope for C#'s sake that at some point it can metamorphize--not just evolve--into a new language that can leave some of the crufty decisions behind.

Re: Welcome to C# 9.0

#105

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 really is wonderful. Used it at work years ago and still miss it dearly.

The only thing I don't miss is the lack of community. Many things you can get for free in Java/Python cost money in Microsoft land. Even common stuff like decent excel and PDF support. Its getting better but was still the case last time I looked.

What C# needs is Java interop. The VM and bytecode structures are similar enough for it to work. There was a guy maintaining a library for this until recently :(

Official CLR Java interop would kill Java. Within a few years every new project would be in C#.

The only other places I'm aware Java has a big advantage is GC and monitoring. C#'s GC is old school, has long pause times. Makes C# a no-go for many uses. Java also has better monitoring and profiling support.

Re: Welcome to C# 9.0

#106

Earlier quoted context omitted.

> 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.

I mean... if you go that route then I would say Kotlin isn't really ready to be used as a production language in most places due to the severe lack of tooling, especially when it comes to things like static analysis. Sure ktlint is there, but the rules library is lacking.

So from that perspective, Kotlin is playing catch-up.

Re: Welcome to C# 9.0

#107
post #97

This is like reading through a list of Christmas presents I didn't even know I wanted. Relational/Logical patterns are going to revolutionize our ability to make high-level business logic even more accessible to non-wizards. The switch expressions introduced in 8.0 were already very nice for building out our complex in-line mapping code. This takes things to a completely different dimension. I will say that I am a li…

I’m also confused on the relationship between records and structs. I’m guessing in practice it has some of the properties of classes and some of the properties of structures, but I worry it’s just going to complicate things. It’s not like all the old structs in the BCL will just go away.

Re: Welcome to C# 9.0

#108
post #89

Earlier quoted context omitted.

> 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 :-)

Yeah, now it's an officially supported bug-ridden piece of crap. Just like on Windows. Woo, I guess?

Re: Welcome to C# 9.0

#109

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.

I disagree. Automatic destructuring like this can be fantastic. Sure, if you're just destructuring a variable there's not much gain. But this is much smoother: var (f, l) = SomeMethodReturningAPerson(); than: var person = SomeMethodReturningAPerson(); var (f, l) = (person.FirstName, person.LastName); or: foreach(var (f, l) in enumerationOfPersons) { ... } compared to: foreach(var person in enumerationOfPersons) { var…

What I really want is nominal destructuring, not positional. It's really fantastic in ES6/TypeScript.

Re: Welcome to C# 9.0

#110

Earlier quoted context omitted.

You can write Winforms like code in WPF and get better layout capabilities. If you stay away from MVVM then WPF is pretty straightforward.

Please don’t, if I happen to work on it I’ll burn it to the ground. I’ve worked on plenty of WPF applications written like it was winforms and they all sucks.

For quick one offs I still prefer WPF over Winforms even without MVVM and thereby avoiding the learning curve. In the long run MVVM is probably better (although I am not so sure on that either. I have seen plenty of nightmarish “proper” WPF apps too)
Post reply on HN