Am Samstag, den 25.02.2006, 18:30 +0100 schrieb Marc Weustink:
> Yes, Interfaces are language independent. They only define what
> functions/procedures are available within an interface (and what
> calling
> convention). An Interface itself has no data or code. I' is only a
> "contract" that those functions are avalable.
> The actual code is implemented by a delphi/FPC/C++ class.
This is the main advantage of interfaces (which I like(d) very much in
Java):
Interfaces give you compiler checked multiple inheritance. You define
the API, the compiler does check if the actual implementations fulfill
it. This allows things one would have done by adding member fields to
classes before (class xxx is a yyy).
Another nice thing about interfaces is you can swap implementations on
the go (mostly ;), e.g. have different implementations for special
needs. If you like to read a stream buffered or get it over the network,
no problem - the interface is always the same.
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives