opApply not called for foeach(container)

Jonathan M Davis jmdavisProg at gmx.com
Sun Jul 15 12:58:06 PDT 2012


On Thursday, July 12, 2012 16:50:22 monarch_dodra wrote:
> On Wednesday, 11 July 2012 at 20:24:42 UTC, Jonathan M Davis
> 
> wrote:
> > The problem is that it's essentially spread out across 3
> > places: the online
> > spec, TDPL, and the compiler.
> > 
> > ...
> > 
> > - Jonathan M Davis
> 
> The problem is not only the documentation, it's getting
> authoritative answers. I see some strange behaviors, and I can't
> for the life of find out if it is a bug in the
> documentation/compiler, or a pitfall/misunderstanding.
> 
> What is your take on the issue at hand? Bug or Pitfall?

My take on it is that you should either go with ranges or opApply and try to 
avoid mixing them. Ideally, we wouldn't even need opApply anymore, but ranges 
can't quite do everything that it can.

- Jonathan m Davis


More information about the Digitalmars-d mailing list