On Thu, 03 Nov 2005 22:35:34 +0100 Peter Vreman <[EMAIL PROTECTED]> wrote:
> At 20:41 3-11-2005, you wrote: > >On Thu, 3 Nov 2005 20:25:07 +0100 (CET) > >Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > Op Thu, 3 Nov 2005, schreef Mattias Gaertner: > > > > > > > Right. I didn't think of that. > > > > > > > > What about edged brackets? > > > > > > > > type > > > > TGenericClass[T,F] = class > > > > public > > > > procedure Add(Item: T; Flag: F); > > > > end; > > > > > > At first sight it looks okay. If necessary it is possible to introduce > > > a two character bracket, i.e. (# #) or (! !), > > > >Hmm. Emoticons in Freepascal. Nice idea. > > > >(:T:) > > > > > > > or with whatever character you want as long as it is not a prefix or > > > postfix operator. > > > >Yes. As I said, I will implement it first in Lazarus, so we can see what > >it bites. > > The syntax is the easy part. Yes. But the WIKI was not even finished on this part. > How to parse the body of procedures of a > generic type is the crucial part. The normal pascal parser can't be used > because that requires knowledge of the types. > > The easiest way to implement generics are like macro's with parameters. Something like that I have in mind. My main goal is to reduce boring paste/copy/replace, not to moisten FPC. Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel