[fpc-devel] Re: strlist.create [was: type discussion]
listmember
listmember at letterboxes.org
Thu Jun 2 21:26:05 CEST 2005
> First, with
>
> strlist.create;
>
> It is not clear whether strlist is already initialized or not;
> there is no way it can now this.
Why not, what stops you from checking 'strlist <> Nil'.. ?
> Second, with
>
> strlist.create;
>
> It is not clear from reading whether create is a constructor or not.
> Create() is just a convention, which you can decide to ignore.
> Create MUST be a constructor, since you are initializing
> the variable.
Which could be solved by making 'Create' a reserved word for the
constructor only. It has already become a de facto reserved word
anyhow.
More information about the fpc-devel
mailing list