On Sun, 14 Feb 2021, Sven Barth via fpc-pascal wrote:

Am 14.02.2021 um 13:30 schrieb Michael Van Canneyt via fpc-pascal:


On Sun, 14 Feb 2021, Sven Barth via fpc-pascal wrote:

So whether it be this, or just an improvement on the Interfaces we already have, I'd definitely personally be in favor of something that "works like Interfaces except minus the negative performance implications."

There are no significant performance implications of interfaces. They're essentially a virtual method call, something that one is doing all day long with Object Pascal classes.

I think the "performance implications" is more referring to memory management.

Interfaces means an extra object per interface, so more objects on the heap with all the extra memory management that implies.

No, interfaces by *themselves* don't mean that.

I meant in the context of traits and mixins, obviously.

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

Reply via email to