Earlier quoted context omitted.
I agree in a sense but I would do it another way. Either change to the Rust edition equivalent, or simply drop old stuff and keep in the newer bits.
There is a Rust edition equivalent in C#…kindof. The csproj file has a property to specify which version of the language you want to use. So if you set it to 9, the compiler won’t allow features from 10 (supposedly; I haven’t tested it).
Welcome to C# 10
51–59 of 59 posts
Re: Welcome to C# 10
#52Earlier quoted context omitted.
I don't think F# did that by choice. The reference compiler implementation is simply too complicated, which makes it hard to add new features. It is, ironically, also written in F#.
From what I have seen, Don Syme is a very pragmatic language designer and doesn't want to include features just to add them, and he holds .NET interoperability extremely high on the priority list, which further limits adding more functional programming features. I imagine the compiler implementation is complicated, and I would guess it is due to the .NET interoperability.
Re: Welcome to C# 10
#53Oh wow. I do not like that "global using". It harkens to the auto-loading issues I've had with Rails. "Where was this defined? I dunno! It probably works here, though!!1" I generally don't like a random file impacting several other files. Extension methods are ... tolerated and ... "fine" but I still feel unpleasant using them. File-Scoped namespaces seem like someone's really, really tired of having nested folders a…
Re: Welcome to C# 10
#54Earlier quoted context omitted.
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,…
It's literally the same as Rust's prelude system and I don't see anyone complaining so much about this.
Re: Welcome to C# 10
#55C# is becoming the C++ of managed languages. I wish they would stick to a smaller set of more powerful features… like an earlier C# with hygienic macros or something.
Re: Welcome to C# 10
#56Earlier quoted context omitted.
There is a Rust edition equivalent in C#…kindof. The csproj file has a property to specify which version of the language you want to use. So if you set it to 9, the compiler won’t allow features from 10 (supposedly; I haven’t tested it).
I'm aware of on the csproj but it's opt in system. You opt into the features of the version you want. It never disables anything of the prior versions.
Re: Welcome to C# 10
#57Earlier 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").
In this respect x86 is the English of the computing world moreso than even C, Java, etc because these are different cultures. And as someone that was in ESL I can’t express how much waste and cruft is in the language that makes me think it’s Perl or Ruby (note that Larry Wall is a linguist and wrote Perl to be more like a human language - we can see now why it was not a great idea).
Also seriously, human languages are entirely defined by its user base (language pedantic folks have very little influence empirically such as the flawed academic rule of not ending English sentences with a preposition which was a bad port of a rule from Latin) and given the trends of each programming language community I’m doubtful giving language control to users is what helps keep a language ecosystem alive and thriving. In fact, human languages are essentially a secondary map of imperialism, genocide, and suffering across all of human history moreso than trade and integration with consent.
Re: Welcome to C# 10
#58Earlier quoted context omitted.
Doesn't really bother me, so long as the global usings are only kept to a single file. Intellisense will tell you the full namespace, then you can just see if you've got that namespace in the file you're in or in your dedicated global usings file.
> so long as the global usings are only kept to a single file Here's where the mess starts. It seems far too easy to sneak a global import statement in to random files and then have the entire codebase polluted by it. I feel like this is too foot-gun'y, myself.
Re: Welcome to C# 10
#59The most interesting feature here (though included only as a preview) is static abstract members on interfaces, which will make things like generic math possible.
That said, I think I'd prefer the addition of structural inheritance to the existing nominal inheritance. Also, algebraic types.