[fpc-devel] [] property overloads

Ryan Joseph genericptr at gmail.com
Mon Jul 8 20:22:12 CEST 2019



> On Jul 8, 2019, at 2:16 PM, Ben Grasset <operator97 at gmail.com> wrote:
> 
> One thing I might point out as a general tip is that you don't really necessarily *need* an array-style index for the kind of access you seem to be going for, especially if using something like TValue which has a lot of assignment operator overloads in place by default.
> 

That was just an example, nothing to do with TValue. We need pointer getters for “array of record” so we can do:

list[0]^.x := 100;

and it will actually write to the actual record in the array and not a returned copy. However due to how the properties are currently structured this means we can’t use the setter without passing pointers:

list[0] := @vec;

That’s why I think it’s worthing considering the overloading properties to solve this.

Regards,
	Ryan Joseph



More information about the fpc-devel mailing list