Mads Torgersen

Results 29 comments of Mads Torgersen

> Does 'simple name' just mean 'pure identifier'? Or does it include type arguments, a-la `field`? Good point of clarification, thanks. I don't think it has real-world impact, but we...

> > Note that this narrowly treats field and value as keywords only when used as simple names. It does not prohibit declarations of local variables and parameters with those...

> > are only keywords when used as simple_names and even then only within applicable property accessor bodies. > > We should be clear and explicit as to what extent...

I added a few things to the proposal text ahead of Monday's LDM, primarily based on feedback here on this issue - thanks! ❤️ I added: * An explanation of...

@SunnieShine: > What about lambdas? e.g.: Good catch on the lambdas! We currently allow: ``` c# Func lambda1 = (_, _) => "Hello"; var lambda2 = (int _, string _)...

At yesterday's LDM I was reminded that there is one more kind of potential break with `field`: A local variable declaration of `field` _within_ a property accessor body: ``` c#...

@AlekseyTs: > There is also a parameter case, a lambda parameter or a local function parameter. I dont _think_ they are a problem, unless I misunderstand your point. Parameters _are_...

@HaloFour: > Can C# be changed to consider `value` and `field` as keywords instead of parameters, thus allowing locals to be declared using `@` to differentiate them from those keywords?...

Riffing further on this, the context within which `value` and `field` would be keywords would be very similar to `await` (https://github.com/dotnet/csharpstandard/blob/standard-v7/standard/expressions.md#12981-general) in that it is a keyword within a whole...

@CyrusNajmabadi: > Unfortunately, we literally only have 8 bits that we can use to store this data for, and we're already full-up on bits :'( Well shucks, there goes that...