Ideas for shortening "foreach_reverse" (was Re: I have a suggestion.)

Derek Parnell derek at nomail.afraid.org
Thu May 17 17:16:41 PDT 2007


On Thu, 17 May 2007 10:58:36 -0700, Sean Kelly wrote:

> 
> I still like:
> 
> foreach - unordered?
> foreach(fwd) - explicitly forward
> foreach(rev) - explicitly reverse
> foreach(any) - unordered

I like this style of syntax for D too. The keyword "foreach_reverse"
doesn't go with the rest of D's style.

I also like the styles in which the order qualification is more visually
linked to the array reference itself. Something along the lines of ...

  foreach( elem, array.order.fwd)
  foreach( elem, array.order.rev)
  foreach( elem, array.order.none)

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Justice for David Hicks!"
18/05/2007 10:09:43 AM



More information about the Digitalmars-d-announce mailing list