Thread overview | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 18, 2005 DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
More dusty old bugs fixed. http://www.digitalmars.com/d/changelog.html |
March 18, 2005 Re: DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <newshound@digitalmars.com> wrote in message news:d1f58u$1gq5$1@digitaldaemon.com... > More dusty old bugs fixed. > > http://www.digitalmars.com/d/changelog.html > new in dmd-119 on WinXP. The following causes dmd to crash template Foo(alias tail) { } struct List(V) { mixin Foo!(tail); V tail; } int main(){ List!(int) x; return 0; } MinTL uses template to share code between parametrized structs so I found the ability to pass data member names to templates very useful. -Ben ps - should we post regressions to D.bugs or follow up to the announcement? |
March 18, 2005 Re: DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d1faqu$1pir$1@digitaldaemon.com... > -Ben > ps - should we post regressions to D.bugs or follow up to the announcement? I think in D.bugs. |
March 19, 2005 Re: DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote: > More dusty old bugs fixed. > > http://www.digitalmars.com/d/changelog.html " C-style casts are no longer deprecated, they are now illegal." Yay! We've just entered a new era of programming! -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
March 19, 2005 Re: DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | In article <d1f58u$1gq5$1@digitaldaemon.com>, Walter says... > >More dusty old bugs fixed. > >http://www.digitalmars.com/d/changelog.html > > > Walter, since this is now the new spot that you're going to post the future D release announements, could you please add the following new links to the main D webpage, under the "Community" section: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.announce http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.learn Since I do not use a news reader at work, it would be nice to be able to read and posts to these additional forum areas using the web-browser. Thanks in advance, David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" |
March 19, 2005 Re: DMD 0.119 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to David L. Davis | Good idea. Done. -Walter |
March 19, 2005 forward reference of mixin alias parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ben Hinkle | "Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d1faqu$1pir$1@digitaldaemon.com... > new in dmd-119 on WinXP. The following causes dmd to crash > template Foo(alias tail) { > } > struct List(V) { > mixin Foo!(tail); > V tail; > } > int main(){ > List!(int) x; > return 0; > } > > MinTL uses template to share code between parametrized structs so I found the ability to pass data member names to templates very useful. The problem is 'tail' being forward referenced by the mixin. It works if you swap the declaration order of Foo!(tail) and tail. |
March 20, 2005 Re: forward reference of mixin alias parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Can you explain the code? What's the mixin do? "Walter" <newshound@digitalmars.com> wrote in message news:d1idtn$27u8$1@digitaldaemon.com... > > "Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d1faqu$1pir$1@digitaldaemon.com... >> new in dmd-119 on WinXP. The following causes dmd to crash >> template Foo(alias tail) { >> } >> struct List(V) { >> mixin Foo!(tail); >> V tail; >> } >> int main(){ >> List!(int) x; >> return 0; >> } >> >> MinTL uses template to share code between parametrized structs so I found the ability to pass data member names to templates very useful. > > The problem is 'tail' being forward referenced by the mixin. It works if you swap the declaration order of Foo!(tail) and tail. > > |
March 20, 2005 Re: forward reference of mixin alias parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jamboree | Jamboree wrote: > Can you explain the code? What's the mixin do? The code was posted here because it crashes the compiler (indicating a bug in the compiler). Whether it makes sense or not is somewhat irrelevant to the bugs newsgroup. A crasher is a bug that should be fixed. If you want to know more about mixins you can read http://www.digitalmars.com/d/mixin.html. If you want to learn about mixins you should probably post in digitalmars.D.learn. If already know quite a bit about mixins and want to discuss the minutiae involved in a particular syntax, then you should post in digitalmars.D. Or if you want to discuss MinTL in particular, you might want to post in digitalmars.D.dtl. By the way, your test seemed to work. ;) That's just what I'm suggesting. You can take it with a grain of salt. > > "Walter" <newshound@digitalmars.com> wrote in message news:d1idtn$27u8$1@digitaldaemon.com... > >>"Ben Hinkle" <bhinkle@mathworks.com> wrote in message >>news:d1faqu$1pir$1@digitaldaemon.com... >> >>>new in dmd-119 on WinXP. The following causes dmd to crash >>>template Foo(alias tail) { >>>} >>>struct List(V) { >>> mixin Foo!(tail); >>> V tail; >>>} >>>int main(){ >>> List!(int) x; >>> return 0; >>>} -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
March 20, 2005 Re: forward reference of mixin alias parameter | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jamboree | In article <d1ikhn$2dvf$1@digitaldaemon.com>, Jamboree says... > >Can you explain the code? What's the mixin do? The original code is from list.d in mintl and the template is shared between the regular doubly-linked list List type and circular doubly-linked list CList. The template has things like isEmpty, opIndex, reverse, etc. There are plenty of mixins in MinTL for things that get shared like the opApply bodies and catenation operators. Basically when I saw three or four classes having the exact same functions I would factor them out into a mixin. For the posting, though, I removed all the guts from the mixin since they didn't matter for the bug. In case you have no idea what I'm talking about with MinTL this and that you can read about it at http://home.comcast.net/~benhinkle/mintl/ >>> template Foo(alias tail) { >>> } >>> struct List(V) { >>> mixin Foo!(tail); >>> V tail; >>> } >>> int main(){ >>> List!(int) x; >>> return 0; >>> } |
Copyright © 1999-2021 by the D Language Foundation