[fpc-pascal] Record helper properties
Ryan Joseph
ryan at thealchemistguild.com
Wed Apr 24 15:28:59 CEST 2019
> On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt <michael at freepascal.org> wrote:
>
> I would think this should be allowed, yes. I see no reason to disallow it.
Agreed but Sven says something about published fields though. The property just acts as simple alias so I don’t understand what the problem could be either. I’ll put this on my to-do list to fix in the compiler if it’s permitted.
>
> That said, I see also no reason why on earth you would want to add this, as you can
> just access x ? The only sensible addition would be using a getter/setter,
> to do some kind of check or transformation.
I just wanted to add some R,G,B fields to a vector instead of adding them into the vector itself. Minor code hygiene thing that would be nice to accommodate but all the accessors required now makes this not so appealing.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list