On Wed, 12 Jan 2011, Michael Schnell wrote:
On 01/12/2011 04:48 PM, Alexander Klenin wrote:
Blindly replacing "a += b" with "a := a + b" may lead to a semantic change
if "a" is an expression with side-effects.
Nevertheless, I do think that implementing += for properties is a good
idea,
but unfortunately FPC developers disagree.
I do see that also properties could show site effects when used in a +=
expression, as they are accessed twice. But is this (in nearly all cases) not
exactly what the user would expect ?
Most of the time, yes. But there are some subtleties with interfaces and
reference counting, which could bite you in the leg.
(as they already have for some people).
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel