Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 18, 2008 DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Some new stuff to make writing templates easier. http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.031.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.015.zip |
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Some new stuff to make writing templates easier.
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip
Awesome; thanks!
Out of curiosity, why doesn't return type deduction work for all functions (is this panned?). It seems to be possible to do:
auto foo()()
{
return 10;
}
but not:
auto foo()
{
return 10;
}
Allowing the latter would open up return type deduction for class member functions.
|
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3agsn$1o76$2@digitalmars.com... > Some new stuff to make writing templates easier. > > http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.031.zip > > http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.015.zip Bug 617 fixed? YES. Bug 1559/2140 fixed? YES. Bug 1675 -- wait, how did you fix that one? Also like the template alias arguments taking literals and template constraints on the D2 side. Will the template alias parameter extension eventually extend to being able to alias expressions in general? |
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g3b6db$fu3$1@digitalmars.com... > > "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3agsn$1o76$2@digitalmars.com... >> Some new stuff to make writing templates easier. >> >> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.031.zip >> >> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.015.zip > > Bug 617 fixed? YES. > > Bug 1559/2140 fixed? YES. > > Bug 1675 -- wait, how did you fix that one? > > Also like the template alias arguments taking literals and template constraints on the D2 side. Will the template alias parameter extension eventually extend to being able to alias expressions in general? Crap, tried compiling something and got this: Assertion failure: 'global.errors' on line 272 in file 'statement.c' Turns out it's stuff like this: if(foo) mixin(SomeTemplate!("blah")); That fails. If the mixin is outside of a control statement, or if (here's the really weird one) you put braces on the body: if(foo) { mixin(SomeTemplate!("blah")); } It works. Short and sweet testcase: const b = "writefln(`hey`);"; if(true) mixin(b); // FAILCOPTER But put {} around mixin(b) and it works. |
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g3b6db$fu3$1@digitalmars.com... > > "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3agsn$1o76$2@digitalmars.com... >> Some new stuff to make writing templates easier. >> >> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.031.zip >> >> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.015.zip > > Bug 617 fixed? YES. 617 doesn't seem to work. The example in bugzilla doesn't, anyway. |
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | "Jarrett Billingsley" <kb3ctd2@yahoo.com> wrote in message news:g3b6db$fu3$1@digitalmars.com... > > "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g3agsn$1o76$2@digitalmars.com... >> Some new stuff to make writing templates easier. >> >> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.031.zip >> >> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.015.zip Bug 2111 fixed? YES. I'm kind of shocked, though, given your less-than-enthusiastic support for backporting it to D1 back when 2.011 came out. |
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Some new stuff to make writing templates easier.
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.031.zip
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.015.zip
Fantastic!
Error #1947 seems to be fixed as well.
(Except for an unrelated trivial error reported in a comment, which I've moved to a new issue (#2153) so that #1947 can be closed).
|
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Fraser | Robert Fraser wrote:
> Out of curiosity, why doesn't return type deduction work for all functions (is this panned?). It seems to be possible to do:
>
> auto foo()()
> {
> return 10;
> }
>
> but not:
>
> auto foo()
> {
> return 10;
> }
Good question!
Because deducing the return type requires semantic analysis, and for functions that introduces the old forward reference chicken-and-egg problem. This doesn't happen with function templates, because semantic analysis of them doesn't happen until later.
|
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Fraser | Robert Fraser wrote:
> Walter Bright wrote:
>> Some new stuff to make writing templates easier.
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.031.zip
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.015.zip
>
> Awesome; thanks!
>
> Out of curiosity, why doesn't return type deduction work for all functions (is this panned?). It seems to be possible to do:
>
> auto foo()()
> {
> return 10;
> }
>
> but not:
>
> auto foo()
> {
> return 10;
> }
>
> Allowing the latter would open up return type deduction for class member functions.
Makes sense to me, although the second version would have to be made into a template. Why? Because what type is 10? Is it a int? a uint? etc... If it was automatically made into a template I'd be cool with that.
-Joel
|
June 18, 2008 Re: DMD 1.031 and 2.015 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote: > Bug 1675 -- wait, how did you fix that one? Too long identifiers get turned into an md5 hash (a suggestion made many times here). It's ugly, and the names are not demanglable, but it works. > Also like the template alias arguments taking literals and template constraints on the D2 side. Andrei's ideas. > Will the template alias parameter extension eventually extend to being able to alias expressions in general? No, because they have to be evaluatable at compile time. |
Copyright © 1999-2021 by the D Language Foundation