Neal Gafter

Results 247 comments of Neal Gafter

/cc @MadsTorgersen @jaredpar for this question.

Specification in progress at https://github.com/dotnet/csharpstandard/pull/213

Spec in progress at https://github.com/dotnet/csharpstandard/pull/213.

I imagine you could add `[Flags]` to it, but it wouldn't have any effect other than possibly generating a warning. That attribute has no language meaning.

@AartBluestoke I imagine that adding a new value to a closed enum would be a binary breaking change. Just like `b switch { false => 0, true => 1 }`...

The intent was not to *require* that switches be exhaustive. We'd still permit a switch expression to be non-exhaustive, with a warning. And I don't think we'd add any requirements...

@paulomorgado Do you know why this feature didn't make it into C# 6?

Just to be clear everybody, the precise syntax had been debated ad nauseum a few years ago and this is the winner. If we do the feature the syntax will...

@alrz We would need to define a concept of validity for every context in which an expression could appear. I don't think it is worth it.