On Tue, 7 Feb 2017 13:25:16 +0100 Maciej Izak <hnb.c...@gmail.com> wrote:
> 2017-02-07 13:11 GMT+01:00 Mattias Gaertner <nc-gaert...@netcologne.de>: >[...] > > Sorry, I don't get it. > > Why is using a static method as accessor an advantage? > > > > You can use Get/Set pair of static methods in "property" form. Might be > more handy. Why is that "more handy"? "static" does not have a Self. That is less handy, isn't it? > > > and second: will work for improper implemented code ;) > > > (which is maybe disadvantage?): > > > > > > TFoo($1).F; > > > TFooClass($1).F; > > > > I don't see why these calls require static instead of normal. > > In other scenario (for normal "property") this call will raise AV. I can't follow you here. Are we still talking about why Delphi choose static instead of normal? > btw. "class property" is probably slightly faster ;) because don't pass > "self" parameter. True. OTOH you loose some possibilities. Mattias _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal