[fpc-pascal] Re: New multicast event implementation

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Feb 2 15:43:27 CET 2011




On Wed, 2 Feb 2011, Anthony Walter wrote:

> By the way, does Free Pascal generic support generic constraints yet? Also,
> this format seems more natural to me:

No, it does not.

Michael.

>
> TCollection<T: TCollectionItem> = class
>  property Count: Integer;
>  property Items[Index: Integer]: T;
> end;
>
> TStatusPanels = class(TCollection<TStatusPanel>);
>
> rather than ...
>
> generic TCollection<T> = class // no constrain ability
>  property Count: Integer;
>  property Items[Index: Integer]: T;
> end;
>
> TStatusPanels = specialize TCollection<TStatusPanel>;
>



More information about the fpc-pascal mailing list