Is D 0.163 D 1.0?

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Sat Jul 29 06:32:06 PDT 2006


Oskar Linde wrote:
> Bruno Medeiros wrote:
>> Oskar Linde wrote:
>>>
>>> I'd say the implicit function template instantiation limitations are 
>>> somewhat show stopping:
>>>
>>> 1. IFTI doesn't work for member functions.
>>> 2. Partial specialization doesn't work with IFTI.
>>> 3. Partial template instantiation isn't allowed with IFTI.
>>> 4. More IFTI limitations...
>>>
>>> Walter has acknowledged that number 2 is a bug. I don't know of any 
>>> workaround for number 1. Those are all hampering library development, 
>>> which IMHO would qualify as show stoppers for a 1.0 status.
>>>
>>> Of course, the most important thing is to make clear which 
>>> limitations are meant to remain and which are to be classified as bugs.
>>>
>>> /Oskar
>>
>> What is partial specialization ? And Partial template instantiation? 
>> (does that come from C++?)

Oops, I was going to google a bit before asking, but the message got 
sent first. I still searched, so I would know how it is done in C++ (I 
know basic C++, but not C++ templates).

> 
> The term "partial specialization" isn't mentioned in the D spec, but its 
> meaning is documented under "Specialization" in 
> http://www.digitalmars.com/d/template.html
> It basically means that you can specialize a template for e.g. all 
> pointers:
> template tmp(T:T*) {...}
> 

Yup, it's pretty much the same concept as C++.

Speaking about the doc, the "Specialization" section should appear 
sooner, since there are many references to specialization before its 
section. Also, on point 2 of Argument Deduction:
"2. If the type specialization is dependent on a type parameter, the 
type of ... " is a bit ambiguous IMO on the "dependent on a type 
parameter" part, as it is not clear that such depended type parameter 
must be the respective parameter of *that specialization*, and not any 
other type parameter of the template. It's the difference between these 
two cases:

   T : T*
   T : U*


-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list