DMD 0.166 release
Derek Parnell
derek at nomail.afraid.org
Thu Aug 31 19:04:38 PDT 2006
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);
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
1/09/2006 12:02:44 PM
More information about the Digitalmars-d-announce
mailing list