www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - static foreach is deferred

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Walter and I agreed that static foreach, although present in TDPL, poses 
enough new problems to warrant its deferral to post-D2.

Andrei
Nov 18 2009
next sibling parent reply Bill Baxter <wbaxter gmail.com> writes:
On Wed, Nov 18, 2009 at 5:15 PM, Andrei Alexandrescu
<SeeWebsiteForEmail erdani.org> wrote:
 Walter and I agreed that static foreach, although present in TDPL, poses
 enough new problems to warrant its deferral to post-D2.

 Andrei
Is it trouble with scopes and hygenic variable naming? --bb
Nov 18 2009
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Bill Baxter wrote:
 On Wed, Nov 18, 2009 at 5:15 PM, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:
 Walter and I agreed that static foreach, although present in TDPL, poses
 enough new problems to warrant its deferral to post-D2.

 Andrei
Is it trouble with scopes and hygenic variable naming?
Yah. I know we all think it's an interesting path to pursue, but we'd rather do a good design instead of hastily planting something we'll be sorry about later. Andrei
Nov 18 2009
parent Clay Smith <clay.smith.r gmail.com> writes:
Andrei Alexandrescu wrote:
 Bill Baxter wrote:
 On Wed, Nov 18, 2009 at 5:15 PM, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:
 Walter and I agreed that static foreach, although present in TDPL, poses
 enough new problems to warrant its deferral to post-D2.

 Andrei
Is it trouble with scopes and hygenic variable naming?
Yah. I know we all think it's an interesting path to pursue, but we'd rather do a good design instead of hastily planting something we'll be sorry about later. Andrei
If this is the reason, thanks for prioritizing good design over feature creep. : )
Nov 18 2009
prev sibling next sibling parent reply Jesse Phillips <jessekphillips gmail.com> writes:
On Wed, 18 Nov 2009 17:15:34 -0800, Andrei Alexandrescu wrote:

 Walter and I agreed that static foreach, although present in TDPL, poses
 enough new problems to warrant its deferral to post-D2.
 
 Andrei
Just a clarification request. static foreach will be part of the D2 spec but not implemented prior to release? I ask because post-D2 sounds like D3, but present in TDPL sounds like part of the spec for D2.
Nov 18 2009
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Jesse Phillips wrote:
 On Wed, 18 Nov 2009 17:15:34 -0800, Andrei Alexandrescu wrote:
 
 Walter and I agreed that static foreach, although present in TDPL, poses
 enough new problems to warrant its deferral to post-D2.

 Andrei
Just a clarification request. static foreach will be part of the D2 spec but not implemented prior to release? I ask because post-D2 sounds like D3, but present in TDPL sounds like part of the spec for D2.
It will go away from TDPL, as much as it pains me (I had a killer example using it). Andrei
Nov 18 2009
prev sibling parent Trass3r <mrmocool gmx.de> writes:
Andrei Alexandrescu schrieb:
 Walter and I agreed that static foreach, although present in TDPL, poses 
 enough new problems to warrant its deferral to post-D2.
 
Please don't tell me this would solve the foreach (member; __traits (allMembers, Class)) { foreach (overload; __traits (getVirtualFunctions, Class, member)) { // do stuff } } problem. I've been waiting for this for ages ;)
Nov 19 2009