Op Wed, 16 Jul 2008, schreef Ales Katona:

I think this is also same in Delphi, but I agree that passing pure properties (without getter/setter) to var should possibly be reduced to warning or even hint.

This was discussed before and rejected.

The reason is that a change in implementation of the property should not hav any effect on code that uses of the property.

I.e. a programmer that exposes a variable by means of a property wants to have the option of introducing getters/setters later, otherwise he would have used a public variable. Therefore any code using properties has to be "ready" for future getter/setters.

Daniël
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to