[fpc-pascal] Generic type declaration example versus manual.

Florian Klaempfl florian at freepascal.org
Mon Nov 23 09:28:26 CET 2009


Anthony Walter schrieb:
> 
> type generic TList<T> = class end;
> 
> See, we started a block  {type} and introduced a keyword {generic}
> before the identifier {TList}. This unnecessarily breaks the pattern
> and is inconsistent.

It is a compromise made by the implementor. The proper solution would
have been to throw away the type keyword and introduce generic sections
(a generic is no type after all) but people didn't like this.

Anyways, no need to discuss this matter further on, I'am rather sure a
patch implementing delphi syntax would be accepted maybe even with an
optional generic modifier in FPC.



More information about the fpc-pascal mailing list