On Mon, Jul 31, 2017 at 11:28 AM, Felipe Monteiro de Carvalho <felipemonteiro.carva...@gmail.com> wrote: > On Mon, Jul 31, 2017 at 2:08 PM, Marcos Douglas B. Santos > <m...@delfire.net> wrote: >> But that is the goal to achieve... >> Not because Java, but to restrict the initialization of the attributes. > > I meant that if its trivial to restrict setting final fields to > constructors, but it might be a lot of work to check and make sure > that in each possible execution path inside the constructor the field > can only be set once, I would be happy to have a final implementation > which doesn't do this detail.
Understood. The main goal is having final fields, not matter whether they need to be initialized only in constructor or not. I agree (for the first version). Best regards, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal