POV-Ray : Newsgroups : povray.off-topic : Mildly interesting article : Re: Mildly interesting article Server Time
11 Oct 2024 13:18:09 EDT (-0400)
  Re: Mildly interesting article  
From: Darren New
Date: 11 Nov 2007 20:50:05
Message: <4737b14d$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> http://www.rubinsteyn.com/template_insanity.html
> 
>   Template metaprogramming is really mean to compilers.

I just thought it was cool.

I remember reading of one application (not unlike BOOST) that was built 
for Ada. People complained it was really slow to compile. The compiler 
vendor looked at the code, and said "Why in the world are you doing 
libraries like *that*?? That's terrible to compile."  The programmer 
said "It is modeled after an example in your libraries."  The vendor 
said "The example you modeled it after is a compiler stress-test!"

>   Most compilers have a fixed amount of memory allocated for demangling
> template types. Thus they support only a very small amount of recursions.

Yeah, it definitely looked like abuse to me. Cool, but abuse.

-- 
   Darren New / San Diego, CA, USA (PST)
     Remember the good old days, when we
     used to complain about cryptography
     being export-restricted?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.