[fpc-pascal] Const attributes

Marcos Douglas B. Santos md at delfire.net
Mon Jul 31 17:26:42 CEST 2017

On Mon, Jul 31, 2017 at 11:28 AM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> On Mon, Jul 31, 2017 at 2:08 PM, Marcos Douglas B. Santos
> <md at 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.

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

More information about the fpc-pascal mailing list