Foreach problem

Bill Baxter wbaxter at gmail.com
Mon Jan 12 13:41:06 PST 2009


On Tue, Jan 13, 2009 at 6:25 AM, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:

> because that's basically what a foreach does when using opApply: create an
> inner function and then pass a delegate pointing to that function to
> opApply.
>
> I think the difference between the two is that the compiler handles foreach
> on an array in a special manner without using an inner function/delegate.

That's an implementation detail and shouldn't effect the behavior
visible to the user.

--bb


More information about the Digitalmars-d-learn mailing list