[fpc-devel] Templates / Generics
Christian Iversen
chrivers at iversen-net.dk
Fri Nov 4 16:15:22 CET 2005
On Friday 04 November 2005 10:33, Vinzent Hoefler wrote:
> 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.
Yes, "somehow", and not like that ;-)
--
Regards,
Christian Iversen
More information about the fpc-devel
mailing list