Why not move cast to the standard library?

Tom S h3r3tic at remove.mat.uni.torun.pl
Thu Sep 24 12:23:09 PDT 2009


language_fan wrote:
> Thu, 24 Sep 2009 13:47:21 -0400, Steven Schveighoffer thusly wrote:
> 
>> I actually prefer the compiler to handle the casting versus templates to
>> cut down on template instantiation bloat.
> 
> I wonder how D scales to 100 MLOC programs as the template instantiations 
> can be troublesome already in < 1000 LOC programs.

It scales to a few hundred kLoC if you don't abuse templates (too much) 
and sacrifice your firstborn to OPTLINK. I don't know what's further, 
perhaps a hecatomb would do.

On a more serious note, the number of template instantiations will 
probably be more of the logarithmic kind with respect to LoC count. 
Unless you do everything in a generic way. But writing this sort of code 
is a major PITA and often a waste of time.


-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode



More information about the Digitalmars-d mailing list