> On Feb 10, 2021, at 9:06 AM, Michael Van Canneyt <[email protected]>
> wrote:
>
> You said it yourself: internally it will just be an object. Just make it
> formally so.
>
> I also think the argument of reusing existing objects deserves consideration.
Is it strange that there are extra things in the object which aren't related to
the trait? You could declare destructors/constructors and maybe function
modifiers that don't make sense in modern code. I don't have a strong argument
I guess except it feels clean to start with a fresh slate. I'm also assuming
that during development we'll find problems with how to handle feature X of
objects which are conflicting somehow and it would be easier to have a new type
to resolve this. I'll wait to hear from others.
Still, the biggest hurdle is getting any acceptance from the compiler team. I
really don't like the interface delegation pattern (from Delphi?) because it
doesn't help with namespaces but as Sven suggested this should be good enough
for us. Traits are easy to understand and implement but the interface
delegation requires tons of boiler plate and you still need to subscript into
classes instead of getting a nice unified namespace.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal