Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-09

Generic Types in FPC

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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>;

Reply by email

Peter Vreman
to Unknown author
Show quoted text 19 lines
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.

Reply by email