csharpstandard icon indicating copy to clipboard operation
csharpstandard copied to clipboard

Saying as much as possible in grammar rules vs. saying less there and augmenting with semantic rules in narrative

Open RexJaeschke opened this issue 6 months ago • 0 comments

When we were discussing PR #681: “Adding support for default interface function members,” Nigel commented,

“I would recommend not to make any further optional grammar changes at this time; both because there are other things to address, and because I don’t think it is clear the switching to more general grammar with added semantic rules for different contexts is a simplification in this case – it may or may not be.

(A good rule of thumb is for reference grammars to be as explicit as reasonable with fewer context sensitive semantic rules; an implementation grammar may tend to the more lenient. But rules are aways flexible and there is often no right answer per se. In this case? No idea yet.)”

We agreed to ignore the “grammar vs. semantic rules” discussion until after PR #681 is merged. Once that happens, Nigel will write grammar tests for it, which will involve considering all the added semantic rules. At that time, he will consider whether removing the grammar rules is a good idea or not.

RexJaeschke avatar Sep 26 '25 11:09 RexJaeschke