DMD 0.166 release

Tom S h3r3tic at remove.mat.uni.torun.pl
Thu Aug 31 20:08:28 PDT 2006


Derek Parnell wrote:
> On Fri, 01 Sep 2006 00:50:48 +0200, Oskar Linde wrote:
> 
>> Jarrett Billingsley wrote:
>>
>>> "Kirk McDonald" <kirklin.mcdonald at gmail.com> wrote in message
>>> news:ed7ddg$6r2$1 at digitaldaemon.com...
>>>
>>>> Nice. I'll have to play with the improved IFTI support.
>>>>
>>> Hm.  I missed this new feature.  What does it include?  There's not even a
>>> link to a conversation, and I don't remember any threads about this.
>> It is really just a small patch that enables implicit function template
>> instantiation for member function and operator templates. It should work
>> identically to how IFTI works for free functions. 
>>
>> It should open up quite a few door. Here is a quick demo I hacked together
>> of how compile time dimensionality checking can be implemented:
>>
>> http://www.csc.kth.se/~ol/physical.d
>>
>> /Oskar
> 
> In your example code you have ...
> 
> 	// One wishes the .toString was unnecessary...
> 	writefln("A current of ",i.toString);
> 	writefln("through a voltage of ",v.toString);
> 	writefln("requires a resistance of ",r.toString);
> 	writefln("and produces ",w.toString," of heat.");
> 	writefln("Total energy used in ",ti.toString," is ",e.toString);
> 
> 
> but could you not also use ...
> 
> 	writefln("A current of %s",i);
> 	writefln("through a voltage of %s",v);
> 	writefln("requires a resistance of %s",r);
> 	writefln("and produces %s of heat.",w);
> 	writefln("Total energy used in %s is %s",ti,e);


Nope, since it only works for classes, and his SiQuantity is a struct



More information about the Digitalmars-d-announce mailing list