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
Welcome to C# 9.0
141–150 of 196 posts
Re: Welcome to C# 9.0
#142Earlier 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)
Re: Welcome to C# 9.0
#143Mono remains the best (only?) solution to call C# from C++ in a crossplatform way using embedding.
Re: Welcome to C# 9.0
#144How 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
Re: Welcome to C# 9.0
#145I 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.…
Re: Welcome to C# 9.0
#146Earlier 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…
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
#147Earlier 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...
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
#148Earlier 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.
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
#149Earlier 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.
Re: Welcome to C# 9.0
#150This 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...