Another day in the ordeal of cartesianProduct

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Oct 27 06:06:11 PDT 2012


On 10/27/12 8:23 AM, Peter Alexander wrote:
> Yeah, it's certainly not going to be easy. It's unfortunate that D
> adopted the whole C++ style "glorified macros" approach to templates --
> it makes it very difficult to reason about (or automate reasoning about)
> the semantics of your code.

I think D has reached a sweet spot with restricted templates.

> Retrofitting some sort of structure to templates will be a Herculean
> task, but I think it has to happen. It is clear to me that the
> development process we use now (write the template, try a few
> instantiations, pray) is unsustainable beyond simple templates.

It's not clear to me at all. The mechanism works very well and is more 
expressive than alternatives used by other languages.


Andrei




More information about the Digitalmars-d mailing list