RecordGenerator icon indicating copy to clipboard operation
RecordGenerator copied to clipboard

Support positional/ordered and nominal/unordered data objects/records

Open amis92 opened this issue 7 years ago • 2 comments

Positional records have public "primary" constructor and the order of their properties matters. They support all features but are not extensible while keeping backwards compatibility.

Nominal records have no accessible constructor, have to be built using builder or factory methods, order of their properties does not matter, and they can be extended with additional members while keeping binary compatibility with older versions.

amis92 avatar Jul 05 '18 16:07 amis92

C# lang design discussion: https://github.com/dotnet/csharplang/blob/master/meetings/2018/LDM-2018-10-22.md#nominal-records

amis92 avatar Jul 26 '19 15:07 amis92

Maybe we can build something similar, or would hiding the constructor be enough?

amis92 avatar Jul 26 '19 15:07 amis92