Earlier quoted context omitted.
Does that make Java the C of managed languages? The great thing about C#/kotlin throwing the kitchen sink at stuff is the good stuff eventually makes it's way into Java.
I find Java's features to be very well balanced, and only make it into the language after they've been vetted and tested in the wild by other languages. e.g. see their take on concurrency by means of project Loom. No need for async/await and providing separate APIs for sync vs async operations. It has records and sealed types and pattern matching, and is getting destructuring soon.
Welcome to C# 10
31–40 of 59 posts
Re: Welcome to C# 10
#32Ugh. So with the new method groups feature, adding a new method overload can break working code even if that code never calls the new overload.
That was already the case. This does not change that issue. Using the example of Console.Read from the article, in C# 9, you could do `Func read = Console.Read;`. Now, if someone adds an overload for the Read method to Console, that C# 9 code will break. In C# 10, that doesn't change. What changes is that we don't have to specify `Func `. We can just use `var`.
Re: Welcome to C# 10
#33Earlier quoted context omitted.
I do not like that "global using" as well. I wonder why they added it.
Looks like they added global usings to support their implicit usings functionality. Essentially they want to save people having to put using System, System.Linq, System.Collections.Generic, and others[0] at the top of nearly every C# file. I'm of two minds: - I think they're an anti-pattern, because it creates a global scope that can get messy/annoying. - It makes a ton of sense for the implicit usings functionality,…
Re: Welcome to C# 10
#34Earlier quoted context omitted.
We don't know how to make languages. We're in the Kepler stage of software development. Everyone has a different 'cosmology' to explain what's going on, we don't yet have the technology to understand what's going on, we don't have the math yet to explain what's going on, and we're just in the very beginning stages of even being able to take measurements of anything worth while. "Here's a feature" Now, will it makes c…
I wonder if there is any parallels of programming languages to spoken languages. Every year, new words are constantly added to official dictionaries ... while old words continually fall out of favor/use. And concepts in one language (e.g. "English" or "Rust") then get adopted/imported into another language (e.g. "French" or "Go").
But OP is right - we haven't really been doing programming all that long in the grand scheme of things, and there are still too many unsettled questions.
Also, in many cases, we came up with desirable concepts long ago, but using them wasn't feasible due to performance overhead until recently.
Re: Welcome to C# 10
#35Earlier quoted context omitted.
I do not like that "global using" as well. I wonder why they added it.
Looks like they added global usings to support their implicit usings functionality. Essentially they want to save people having to put using System, System.Linq, System.Collections.Generic, and others[0] at the top of nearly every C# file. I'm of two minds: - I think they're an anti-pattern, because it creates a global scope that can get messy/annoying. - It makes a ton of sense for the implicit usings functionality,…
Interesting that this doesn't bother me at starting from .net 1.0. All tools (including raw VS without addins) can add those using automatically and they do.
But for me it's still a nice to have feature if VS will be able to show where this using is defined.
Re: Welcome to C# 10
#36Earlier quoted context omitted.
We don't know how to make languages. We're in the Kepler stage of software development. Everyone has a different 'cosmology' to explain what's going on, we don't yet have the technology to understand what's going on, we don't have the math yet to explain what's going on, and we're just in the very beginning stages of even being able to take measurements of anything worth while. "Here's a feature" Now, will it makes c…
I wonder if there is any parallels of programming languages to spoken languages. Every year, new words are constantly added to official dictionaries ... while old words continually fall out of favor/use. And concepts in one language (e.g. "English" or "Rust") then get adopted/imported into another language (e.g. "French" or "Go").
I think this analogy is a good one. I've always held that software development has a crafty side in addition to the raw computer science. And I think you nailed it that this is where that comes in. There's multiple ways to write any program. So the only "complete" language is one that allows you to express anything and everything exactly the way you want to.
For instance, one could argue that using process forking vs threads vs fibers vs async / await are all just different connotations of the same denotation of "doing multiple things in parallel".
Re: Welcome to C# 10
#37Ugh. So with the new method groups feature, adding a new method overload can break working code even if that code never calls the new overload.
That was already the case. This does not change that issue. Using the example of Console.Read from the article, in C# 9, you could do `Func read = Console.Read;`. Now, if someone adds an overload for the Read method to Console, that C# 9 code will break. In C# 10, that doesn't change. What changes is that we don't have to specify `Func `. We can just use `var`.
void Foo(double x) { ... }
Foo(123);
This works, but now I add an overload: void Foo(decimal x) { ... }
and the above call is now ambiguous. Note that this example goes all the way back to C# 1.0!Method overloading (and how it interacts with other language features) is probably the single most complicated part of C# today, for good reasons.
Re: Welcome to C# 10
#38Ugh. So with the new method groups feature, adding a new method overload can break working code even if that code never calls the new overload.
In any popular language, if you have some method whose single argument is being implicitly upcast by a caller then you add a more specific overload on that arguments inheritance hierarchy, the caller will now be calling the new method.
Re: Welcome to C# 10
#39Re: Welcome to C# 10
#40Earlier quoted context omitted.
I find Java's features to be very well balanced, and only make it into the language after they've been vetted and tested in the wild by other languages. e.g. see their take on concurrency by means of project Loom. No need for async/await and providing separate APIs for sync vs async operations. It has records and sealed types and pattern matching, and is getting destructuring soon.
.NET async interops nicely with any other language that can do basic callbacks (even C!). How does that work in Loom?