This is a feature request:
NewType<> gives us static New method and [Union] generates a MyUnionTypeCon factory for creating instances using a static method. [Record] just generates a constructor.
Can we have some static factory method with [Record], e.g. MyRecordType.New(....)?
The only issue is possible clashes with field names, although I鈥檇 say this is the least problematic, so yes it seems reasonable. The main reason for a separate static class was to make the use of generics easier, so perhaps non-generic Records could drop the static class and use New instead.
Just realised my mistake (sorry, our to lunch and wasn鈥檛 paying proper attention); ignore my comments about the static class, yes we can have a New method
Deployed in v3.3.51
Most helpful comment
Deployed in
v3.3.51