David Arno
David Arno
> @DavidArno "2 - Avoid new contextual keywords" doesn't catch a silent breaking change where the field was already declared as `string @field;` and referenced inside the accessor as either...
Clearly "good" is in the eye of the beholder. Improving the user experience through improved syntax consistency and embracing modern language idioms is clearly a good reason to break in...
This is effectively a duplicate of #316. And, just like with that proposal, such requests are examples of use cases that could be covered by active patterns. [The active pattern...
@orthoxerox, Not quite extension enough for me. [Active patterns](https://github.com/dotnet/csharplang/issues/277) (which I think is what I think @alrz is referring to with "extension patterns") would complete the set. But this feature...
@orthoxerox, Input parameters and an active pattern name, eg: ```cs public static bool ValidPostcodePattern(this string str) { ... if (postcode is ValidPostcode) ... ```
@orthoxerox, Oh! That's a really neat solution. In that case, you're right: input parameters are indeed the only part that's missing.
Unfortunately, I can't find where I originally suggested it, but as a reminder to @gafter, input parameters could be handled by using `in`. A highly contrived example: ```cs public static...
@Thaina, What keyword would you use? Also bear in mind that we talking patterns here, so, if for example the following were valid: ```cs if (postcode is ValidAndFormattedPostcode("gb", var formattedPostcode))...
@alrz, > I am still trying to think of an actual use for a bool-returning Deconstruct which does not suffer from these issues. The obvious one for me is with...
@alrz, > There is a couple of things to point out here: I completely agree that the proposal here does not work well for active patterns. But as @gafter said...