[fpc-devel]Generic Types in FPC

Peter Vreman peter at freepascal.org
Sun Sep 12 16:46:04 CEST 2004


> According to Robert Love's blog Delphi will provide generic types
> support. Will FPC support the feature in the same way?
>
> Delphi Syntax for Generic Types will be:
>
> type
>   TFoo<T> = class
>   private
>    data1: T;
>   public
>     function SomMethod(param1: INteger; Param2 :T) : Integer;
>   end;
>
> function TFoo<T>.SomeMethod(...);
> begin
> end;
>
> var
>   Foo : TFoo<Integer>;

Maybe in the far-far future and only when it is really needed for
compatibility.

First the focus is on a stable multiplatform compiler with compatibility
upto delphi 7. Things like packages support is much more important than
all these new features, which are not even in a released delphi.






More information about the fpc-devel mailing list