[fpc-devel] Templates / Generics

Vinzent Hoefler JeLlyFish.software at gmx.net
Fri Nov 4 10:33:38 CET 2005


On Friday 04 November 2005 09:25, Micha Nelissen wrote:
> Marc Weustink wrote:
>
> > If the generic is "pre"compiled (which is maybe necesary if you
> > need access to privates) then I fear some runtime logic has to be
> > added to call the correct procedure. IE. something like
> >
> >   case TypeInfo(Data) of
> >     StringType: Show(Data);
> >     IntegerType: Show(Data);
> >   end;
>
> The whole idea of Generics is to avoid this :-)

At user level, yes. But as a compiler-writer you'd gotta make it work 
somehow.


Vinzent.

-- 
public key: http://www.t-domaingrabbing.ch/publickey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20051104/d035236e/attachment.sig>


More information about the fpc-devel mailing list