Open BillWagner opened 8 months ago
@CyrusNajmabadi Does this capture your thoughts on Wednesday?
Another area for discussion on this issue:
How do we want to handle spec deviations where the rolsyn compiler behavior enables code constructs that the Standard prohibits.
One example is how roslyn handles reference parameters for iterator methods and async methods
In both clauses, the standard states:
When a function member is implemented using an iterator block (or async method), it is a compile-time error for the formal parameter list of the function member to specify any
in
,out
, orref
parameters, or any parameter of aref struct
type.
However, the roslyn implementation allows this as long as that parameter isn't captured by the iterator or async state machine.
Implementation specific documentation
Summary
In LDM, we've wanted to be precise and complete on the behavior of new features. This means that feature speclets often include more implementation details than we might want in the official language specification. We want a roadmap for ourselves to document this behavior, and guidelines on what should be in the language specification vs. roslyn-specific documents.
For example, the roslyn repo already includes a document for Specification deviations.
Motivation
We want to clearly define all supported behavior, but we also want to keep the language specification "clean" regarding many implementation details.
Detailed design
There should be four different documents in the roslyn repo, and the published on Microsoft Learn in the language specification area. Most are required in the section of the specification on Portability issues
1
as the value of abool
that istrue
. The language specification only requires a value be "distinct from zero.".Drawbacks
It is more work.
Alternatives
We could require all the implementation behavior to be part of the language specification.
Unresolved questions
What behaviors that aren't required by the standard are supported by roslyn?
Design meetings
This issue was raised on Jan 31. Notes aren't yet available.