[fpc-pascal] Const attributes
Marcos Douglas B. Santos
md at delfire.net
Mon Jul 31 14:08:30 CEST 2017
On Mon, Jul 31, 2017 at 6:25 AM, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> On Sun, Jul 30, 2017 at 10:47 PM, Sven Barth via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
>> (though if one would restrict the assignments to the constructors itself
>> without any methods called by the constructor then we might be able to
>> implement that nevertheless, don't know what Java or other languages
>> with final fields allow here)
>
> Java final fields can only be set in constructors (and only once in
> each constructor, but I guess it isn't necessary to immitate this
> part).
But that is the goal to achieve...
Not because Java, but to restrict the initialization of the attributes.
Regards,
Marcos Douglas
More information about the fpc-pascal
mailing list