Lennart Augustsson writes:

> > OK, I'm curious.  Two people replied that C++ has undecidable type
> > checking.  I was not aware of this (although I can't say I'm too
> > surprised); do you have a reference?
>
> It's actually the template processing that can loop, but it is
> sort of part of the type checking.
> 
> You can find an article in the POPL 99 proceeding about it.

Actually, I think Lennart means PEPM '99.  At least, there's an article called
"C++ Templates as Partial Evaluation" by Todd Veldhuizen (from the
wonderfully-named Extreme Computing Laboratory) which refers to this.  He
cites an example of using the templates to generate a list of prime numbers at
compile time due to Erwin Unruh (apparently discovered accidentally!).

Cheers,

Andy


Reply via email to