[fpc-devel] The usage of Include() doesn't work any more in 2.3.1

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jul 16 10:01:46 CEST 2008


On Wed, Jul 16, 2008 at 9:40 AM, Daniƫl Mantione
<daniel.mantione at freepascal.org> wrote:
> I think there can be two visions here:
> - Include is not a real procedure, so this internal implementation detail
>  should be hidden and this can/should be allowed; the
>  compiler internally should convert it into set:=set+[member].

I think this would be ideal.  Using Include() is much cleaner than set
:= set + [member].  And yes I understand that as it was implement, you
could circumvent the getter/setter, but I believe it's something the
compiler must handle correctly.

It's easy for me (from a developers point of view <wink>) to say, but
I think that it's up to the compiler to resolve the issue at hand.
It's not the job of the developer to change all existing code.  Surely
the compiler must be able to detect if set is a property or field
variable. If it's a property, resolve the call to set := set +
[member]

As it stands now, FPC 2.3.1 is going to break a LOT of code. Yes I
know it was maybe a unsafe way of using Include(), but surely the
compiler can handle it better.  Thoughts?

Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/


More information about the fpc-devel mailing list