> On Feb 14, 2021, at 9:16 AM, Michael Van Canneyt via fpc-pascal
> <[email protected]> wrote:
>
> I didn't propose using an interface; For me the
>
> property Test: TTestImpl read fTest implements TTestIimpl;
>
> Where TTestImpl is an object (tp style) or advanced record (delphi style) is
> ample.
That was directly more at Sven. I like the idea of a "default property" and
Sven appears to agree, but there's some debate on how this should be achieved.
In fact we already had another long thread on default properties some years ago
but it got derailed due to the implication of using default properties with all
types.
Maybe what we really want is a default property for struct types which does
strict name collision checking?
property Test: TSomeRec read fTest; default;
That's a simple idea which is easy to reason about, doesn't require any new
syntax and is easy to implement (more on that if we get that far).
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal