[Numpy-discussion] Proposed Roadmap Overview

Sturla Molden sturla@molden...
Sun Feb 19 09:48:04 CST 2012

Den 19.02.2012 10:28, skrev Mark Wiebe:
> Particular styles of using templates can cause this, yes. To properly 
> do this kind of advanced C++ library work, it's important to think 
> about the big-O notation behavior of your template instantiations, not 
> just the big-O notation of run-time. C++ templates have a 
> turing-complete language (which is said to be quite similar to 
> haskell, but spelled vastly different) running at compile time in 
> them. This is what gives template meta-programming in C++ great power, 
> but since templates weren't designed for this style of programming 
> originally, template meta-programming is not very easy.

The problem with metaprogramming is that we are doing manually the work 
that belongs to the compiler. Blitz++ was supposed to be a library that 
"thought like a compiler". But then compilers just got better. Today, it 
is no longer possible for a numerical library programmer to outsmart an 
optimizing C++ compiler. All metaprogramming can do today is produce 
error messages noone can understand. And the resulting code will often 
be slower because the compiler has less opportunities to do its work.


More information about the NumPy-Discussion mailing list