Open trevorgray opened 9 months ago
Would let mutable public
be possible?
That could be an alternative to this. However, currently let bindings in types are always private and do not allow an access modifier to be applied whereas explicit fields can have any access modifier.
Might be useful to reference the { inherit
construct in defining the requirement
I propose we allow the initialization of explicit fields when using a primary constructor.
Currently in order to initialize explicit fields, a non-primary constructor is required:
This proposal is to update the language to allow explicit fields to be initialized when using a primary constructor so that the following is possible:
Related C# feature for parameterless stuct constructors:
Pros and Cons
The advantages of making this adjustment to F# are ...
The disadvantages of making this adjustment to F# are ...
Extra information
Estimated cost (XS, S, M, L, XL, XXL):
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
Please tick these items by placing a cross in the box:
Please tick all that apply:
For Readers
If you would like to see this issue implemented, please click the :+1: emoji on this issue. These counts are used to generally order the suggestions by engagement.