[fpc-devel] Templates / Generics

Micha Nelissen micha at neli.hopto.org
Fri Nov 4 11:03:45 CET 2005


Marc Weustink wrote:
> Micha Nelissen wrote:
> 
>> Marc Weustink wrote:
>>
>>>   case TypeInfo(Data) of
>>>     StringType: Show(Data);
>>>     IntegerType: Show(Data);
>>>   end;
>>
>> The whole idea of Generics is to avoid this :-)
> 
> I mean generated by the compiler, not by the "user"

I understand, but I would be rather disappointed if it were implemented 
like this. One might as well write a script rather than integrate it 
into the compiler; the thing the compiler could add is generate 
efficient *and* compact *and* typesafe code.

Micha




More information about the fpc-devel mailing list