Yes, exactly. - Josh
On Tue, May 10, 2016 at 3:38 AM, Andy Dufilie <andy.dufi...@gmail.com> wrote: > You're right, it is possible, but I think the key word there was "easily." > :) > > Sent from my Android > On May 9, 2016 23:59, "Alex Harui" <aha...@adobe.com> wrote: > > > > > > > On 5/9/16, 1:22 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote: > > > > >That's a good call, Andy. You're absolutely right that a for-each loop > > >could also have its own return statements that are meant for the > > >surrounding function. With that in mind, I don't think there's a special > > >case here that the compiler can easily detect to optimize. > > > > Hmm, maybe I'm missing something. I'm not a compiler expert, but I've > > heard about things like "code-flow analysis" and similar techniques that > I > > thought could be used for determining that there aren't planned exits > from > > a loop. > > > > -Alex > > > > >