Marc Weustink schreef:
Vincent Snijders wrote:
Michael Van Canneyt schreef:
I find classes more natural than interfaces. It 'just works'. Not so
with interfaces, because you must do a typecast every time.
Compare
Function GetPluginInterface : ISOmeThing;
begin
X:=MyPluginObjectXYZ.Create;
Result:=X as ISomething;
end;
This is then a weakness in the language. Because MyPluginObjectXYZ
implements ISOmeThing and the compiler nows that, you should be able
to write just
Result := MyPluginObjectXYZ.Create;
Weakness ? I do this all the time in Delphi. No need for as
I took Michael's example as a requirement, not an option for extra typing :-)
Vincent
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel