www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - There should be an IFTI spec

I think there should be some kind of specification that describes 
implicit function template instantiation in detail; what should work and 
what shouldn't.

The reason why I bring this up is of course that I ran into a specific 
case where IFTI didn't work the way I expected it to. And it got me 
thinking: How on earth am I supposed to know whether this stuff is even 
meant to work?

IFTI is an important feature of D -- it's one of the main reasons why 
metaprogramming in D is usually such a pleasant affair. Hence, it is 
important that all compilers support it *in the same way*, even the ones 
that aren't DMDFE-based. Otherwise you end up with a situation where a 
piece of quite ordinary code compiles with one compiler, but not 
another. Therefore IFTI should be just as well-specified as any other 
part of the language.

For the curious: I decided that my case really should compile, so I 
reported it (bug 3530).


Nov 20 2009