[Enhancement] fixit to auto create ctors and fields from ctor
We discussed on 1/12 @12:15 est about different ways of expressing auto completed ctors and fields without creating extra work, for example, there were 2 proposals that seemed useful.
Proposal 1 - Fixit on class/struct to auto create ctor with all fields in the data type. The only con I see with this one is that it doesn't allow you to easily express the order of the fields and once a class is established, it probably wouldn't be usable.
public class XYZ //fixit here to implement a ctor that takes the fileds and assigns them
{
public int x, y, z;
}
Proposal 2 - Allow you to define a ctor and then fixit on the ctor to implement the assignments and also if any of the fields from the struct/class are missing, they will be generated. The pro to this one is that it allows you to define the order of the fields and allows you to easily create multiple ctors taking any args you want and its usable at any stage of the classes lifetime.
public class XYZ
{
public this(int x, int y, int yz) { } //fixit here to auto assign fields and create missing fields
}