Earlier quoted context omitted.
May I ask why do you think kotlin is best designed?
I think kotlin is ugly hack, if you take away the superficial syntax (?) it will start showing ugly side. I think it only gotten popular because of Googles push due to Oracle Java lawsuit.
Welcome to C# 9.0
161–170 of 196 posts
Re: Welcome to C# 9.0
#162Add init to a property, make its class a data class, and boom you have immutable beautiful class. Kudos to these designers.
(This is similar to AutoValue in Java / data class in Kotlin, but it feels a lot more elegant and connected and simple than what these other languages offer)
Re: Welcome to C# 9.0
#163Earlier 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
Re: Welcome to C# 9.0
#164Earlier quoted context omitted.
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.
I’ve been using Delphi before and it looks like a grown/better Pascal. C# is a c-family language which seems weird right after the switch, however you start appreciate C syntax a bit later. I think C# was an attempt to design MS Java which is better than Java
Re: Welcome to C# 9.0
#165Earlier quoted context omitted.
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 eve…
Re: Welcome to C# 9.0
#166That "Init-only properties" feature is huge. I spend so long at work when working on tests making stubs of objects with private setters etc (e.g. DTOs). That work is essentially gone now, awesome!
Re: Welcome to C# 9.0
#167Earlier quoted context omitted.
My understanding is that the dotnet runtime and powershell are both decent codebases. https://github.com/dotnet/runtime https://github.com/PowerShell/PowerShell
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…
public string TypeName { get; set; }
not sure why it's not here, could just be older code. The [Parameter] etc stuff is all powershell-specific metadata that defines how to use it from the powershell language.
Re: Welcome to C# 9.0
#168Positional 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.
(the "Person" type would have to implement a "Deconstruct" method with two string out parameters, or alternatively someone could write an equivalent extension method)
Re: Welcome to C# 9.0
#169Earlier quoted context omitted.
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 eve…
Re: Welcome to C# 9.0
#170Earlier quoted context omitted.
I’ve been using Delphi before and it looks like a grown/better Pascal. C# is a c-family language which seems weird right after the switch, however you start appreciate C syntax a bit later. I think C# was an attempt to design MS Java which is better than Java
Your both right, C# was MS Java-but-better designed by the designer of Delphi, who had recently (perhaps specifically for that project) been hired by MS.