Is this true? I'd really like to see generics that with a mode where it is
possible to say with the following syntax (compatible with Delphi):

type
  IDelegate<T> = interface
    procedure Add(const Handler: T);
    procedure Remove(const Handler: T);
  end;

And then specialize using the following syntax:

type
  INotifyDelegate = IDelegate<TNotifyEvent>;

Also, generic constraints are needed:

type
  TComponentTool<T: TComponent> = class(TObject)
  public
    procedure DoSomething(const C: T);
  end;

On Fri, Apr 29, 2011 at 3:28 PM, leledumbo <leledumbo_c...@yahoo.co.id>wrote:

> I see now that generics have improved a lot since latest release, we even
> have Delphi compatible syntax in Delphi mode. Recursive generic type is
> supported as well now (finally, I can continue my data structure library
> :)). Seeing these facts, what's the status of this feature now? Is it
> considered stable?--
> View this message in context:
> http://free-pascal-general.1045716.n5.nabble.com/Generics-feature-status-tp4359580p4359580.html
> Sent from the Free Pascal - General mailing list archive at Nabble.com.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to