Live data from Hacker News

Welcome to C# 9.0

devblogs.microsoft.com

141–150 of 196 posts

Re: Welcome to C# 9.0

#141

Earlier quoted context omitted.

I don't think Kotlin is being pushed because of the Oracle lawsuit. Most of Oracle's complaints were at the VM and standard library level, which Kotlin doesn't help with.

Kotlin allows Google to hang out in Java 8 forever. If they want new features they can just add them at the Kotlin layer. Insulates them from OpenJDK and any changes Oracle wants to make. All great opportunities to fragment the Java ecosystem

OpenJDK was always fine for them to pull in, being GPLed. They got in trouble because they based their class library on Apache Harmony originally, and Sun pulled the TCK rug out from under Harmony.

Re: Welcome to C# 9.0

#142
post #113

Earlier quoted context omitted.

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

C# is a very good language. I like it a lot, and Visual Studio is a fine IDE, but the tools pale in comparison to the JVM tools (Maven, Gradle, IntelliJ, Eclipse, Spring Boot, GraalVM, etc)

I am curious why you think this. This may have been true like 10 year ago, but in my experience modern .NET and especially .NET Core has great tooling. What in particular do you find lacking?

Re: Welcome to C# 9.0

#143
I would like to know what is the future of Mono now that dotnet core is crossplatform and Microsoft bought Xamarin.

Mono remains the best (only?) solution to call C# from C++ in a crossplatform way using embedding.

Re: Welcome to C# 9.0

#144
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

There is nothing insane here. All depends on context. Games are known to be developed in C# and the amount of those dwarfs Java's counterpart. There are other areas with the affinity of "insanity" leaning either way.

Re: Welcome to C# 9.0

#145

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

I wouldn't expect that to change any time soon. The Microsoft/Sun lawsuit still stings inside the company and has legal impact decades later (https://www.cnet.com/news/sun-microsoft-settle-java-suit/). It's the reason why, for instance, you can't download Windows 98 or Visual Studio 6 on MSDN/Visual Studio subscriptions. Microsoft is now friendlier to open source than it has been, but I would be shocked if they ever got friendlier with Java. (Disclaimer: I haven't worked at MS in several years)

Re: Welcome to C# 9.0

#146

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

To answer your question first: It's faster on Linux than Windows now (marginally) and completly stable on Linux. I've been running a .net core systemd service for 9 months with 0 downtime (not using the new HostedService class though). It hasn't leaked any memory at all, it's still running perfectly even though it opens thousands of files and thousands of connections to a web service every hour. It's just a process t…

> While Oracle has regressed and is oppressing the ecosystem in its typical ways.

Not sure what you're referring to here. Java/JVM has been open sourced for a while as well.

> while Java is just a kitchen sink of non-cohesive features and libraries

I disagree. If you look at the new features coming out (pattern matching, records, green threads/fibers, value types, etc.) the Java designers are taking a very principled approach. Everything fits very well with the language design.

Re: Welcome to C# 9.0

#147

Earlier quoted context omitted.

Looking at a random file in Powershell, the first thing I see is: private string _typeName; /// /// Add new type name to the specified object for TypeNameSet. /// [Parameter(Mandatory = true, ParameterSetName = "TypeNameSet")] [Parameter(ParameterSetName = "MemberSet")] [Parameter(ParameterSetName = NotePropertySingleMemberSet)] [Parameter(ParameterSetName = NotePropertyMultiMemberSet)] [ValidateNotNullOrEmpty] publi…

Looking at object getter/setters in any OOP is likely to be pretty uninspiring :) There's no logic there, this is basically just boilerplate for some other code to set properties on an object. Something that actually has some business logic will be much more interesting to read, eg. https://github.com/PowerShell/PowerShell/blob/15c2245af97486...

Yeah, clearly there's some code somewhere that does something. I just don't understand why there are so many files and so much code that does nothing and means nothing.

I'm fine with verbosity. I'm fine with lots of data type declarations, annotations, things that make the compiler happy, etc.

But a file full of getters and setters? I can put up with it, but I don't understand why.

Re: Welcome to C# 9.0

#148
post #31

Earlier quoted context omitted.

> graphics.DrawRectangle(RedBrush, new(3, 5, 2, 2)) > graphics.DrawRectangle(RedBrush, new Point(3, 5, 2, 2)) what's the advantage of the first example? i prefer the second, because i don't have to look at the definition of DrawRectangle in order to know that the second argument is a 'Point' object.

Someone in the comments also mentioned array initializers, arguably a better use of the feature.

this specifically.

new List> { new (“a”, 1), new (“b”, 2) }

versus having to barf out the type name for every element will be REALLY nice.

Re: Welcome to C# 9.0

#149
post #36

Earlier quoted context omitted.

.NET ecosystem is large, but still windows-centric. If I was choosing between java and C# for a startup, I'd definitely consider C# because it does seem to be a better java (properties and LINQ are the first 2 things that come to mind). But realistically if you're not doing .NET on windows, you're still an early adopter who's going to run into weird issues that you won't have to deal with on java.

> windows-centric .NET 5 is going to change this completely. .NET Core has already changed.

I was referring to the ecosystem (libraries that are commonly used that might only work on windows). I've had trouble for instance finding cross-platform GUI toolkits that support linux. Microsoft's newly released toolkit doesn't.

Re: Welcome to C# 9.0

#150
I have worked with C# since the early beginning I have used it daily since then. I do know the ins and outs of the different up until C# 8 (latest released) and now .Net core. because I work with it every day.

This probably an unpopular opinion but I wish they would make fewer changes to the language.

A codebase from C# 2 will look entirely different than something written in C# 9.

If you get a developer who has great experience writing 2.0 and bring him into a project in 9 it will look to him or her like a completely different language.

I pretty much wish they created a new .net language D#? (or just put all the effort into changing F# (which I also like).

I also do not like the terseness. Yes I get to type a few less charcters but it makes the language much harder to read:

Pretty much all examples here make some sense if you come from earlier versions or other classical languages including javascript

https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...

Post reply on HN