> On Jun 14, 2018, at 7:26 PM, Sven Barth via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> Because one needs to be able to represent the properties in the RTTI. Without 
> pointers all that is needed to access the property from code is an offset. 
> With pointers you'd need to add where dereferences are required especially as 
> the "path" to the final field could be more complex (e.g. 
> Field1^.Field3.Field1.Field5^.FinalField).

I guess I don’t understand because I thought an offset to a pointer you 
dereference is as good as an offset to anything else. The property contains the 
^ symbol so it should know to dereference the pointer at the offset right?

It would be so much nicer to do this with properties then making tons of boiler 
plate code that fills up the implementation and requires maintaining if you 
change names etc… If you could somehow do it inside the record (like c++) then 
it would be easier to maintain but in Pascal and separate implementation 
section it becomes a bit of a chore.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to