August 31, 2006 DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class. http://www.digitalmars.com/d/changelog.html |
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class.
>
> http://www.digitalmars.com/d/changelog.html
Is there any reason to not use "lazy" as a keyword to modify the
expression, rather than the parameter?
void foo(int delegate() dg) {...}
void bar(int x,int y) {
foo(lazy x+y);
}
|
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | Russ Lewis wrote:
> Walter Bright wrote:
>> The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> Is there any reason to not use "lazy" as a keyword to modify the
> expression, rather than the parameter?
>
> void foo(int delegate() dg) {...}
> void bar(int x,int y) {
> foo(lazy x+y);
> }
One reason is lazy arguments and non-lazy arguments cannot be passed to the same function.
|
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class.
>
> http://www.digitalmars.com/d/changelog.html
Thanks Walter :) And thank you Oskar ! Now we can play with more IFTI :)
|
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound@digitalmars.com> wrote in message news:ed79pv$3fc$1@digitaldaemon.com... > The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class. > > http://www.digitalmars.com/d/changelog.html Ahh, thank you. I wasn't really keen on the lazy stuff. I'd probably never use it, but the new syntax is a lot nicer (and more explicit). |
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Russ Lewis wrote:
>> Is there any reason to not use "lazy" as a keyword to modify the
>> expression, rather than the parameter?
>>
>> void foo(int delegate() dg) {...}
>> void bar(int x,int y) {
>> foo(lazy x+y);
>> }
>
> One reason is lazy arguments and non-lazy arguments cannot be passed to the same function.
One of us is missing something. I'm not sure who :) Can you expand on your response here?
|
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > The implicit conversion to delegate just broke too much. Instead, I'm trying out Tom S.'s suggestion of using a 'lazy' parameter storage class. > > http://www.digitalmars.com/d/changelog.html Nice. I'll have to play with the improved IFTI support. Also, I've added "lazy" to the keyword index: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageSpecification/KeywordIndex -- Kirk McDonald Pyd: Wrapping Python with D http://pyd.dsource.org |
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kirk McDonald | "Kirk McDonald" <kirklin.mcdonald@gmail.com> wrote in message news:ed7ddg$6r2$1@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. |
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote: > "Kirk McDonald" <kirklin.mcdonald@gmail.com> wrote in message news:ed7ddg$6r2$1@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. > > I'm referring to Oskar Linde's member template patches. -- Kirk McDonald Pyd: Wrapping Python with D http://pyd.dsource.org |
August 31, 2006 Re: DMD 0.166 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote: > "Kirk McDonald" <kirklin.mcdonald@gmail.com> wrote in message news:ed7ddg$6r2$1@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 |
Copyright © 1999-2021 by the D Language Foundation