[Discussion] Case Declarations #9502
Replies: 3 comments 11 replies
-
No real comments, this looks great! One thing that did occur is whether or not public closed record A
{
case B;
case C
{
case D;
case E;
}
} |
Beta Was this translation helpful? Give feedback.
-
One of the usual suspects. 😉 As for the proposal, I really like this. The semantics look the same as F# class DU's, but the syntax feels like a natural extension of C#. |
Beta Was this translation helpful? Give feedback.
-
It's an interesting concept, but if closed hierarchies don't require this nesting is it necessary to have a language feature that encourages nesting? My personal experience is that domain hierarchies are very rarely nested like this. Like F#, would there be a value-type version of nested case classes? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal Document: https://github.com/dotnet/csharplang/blob/main/proposals/case-declarations.md
Proposal Issue: #9500
Beta Was this translation helpful? Give feedback.
All reactions