On Sat, Nov 07, 2009 at 01:44:39PM +1000, Alexander Klenin wrote:
> 1) The change was correct in the sense that all properies should be treated
> begin
>   temp := MyObj.MyIntProperty;
>   Inc(temp);
>   MyObj.MyIntProperty := temp;
> end;
> 
> Of course, if the compiler determines that the property is an alias for a 
> field,
> it is free to pass the field directly -- but this is only an optimization.

This is not orthogonal. VAR parameters are generally updated
instantaniously. By delaying the update over a temp variable you break
another aspect of the VAR parameter.

IMHO such kludges only lead to more kludges.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to