> On July 25, 2013, 9:13 p.m., Ben Mahler wrote:
> > Thanks!
> > 
> > I'm noticing angular.forEach and I'm not sure I find it as clean as _.each 
> > (see my comment on https://reviews.apache.org/r/12830/).
> 
> Ross Allen wrote:
>     angular.forEach is equivalent to _.each but with a bit longer name. They 
> both actually delegate to the native Array.forEach[1] in browsers that 
> implement it: IE9+, and all modern browsers.
>     
>     I like `forEach` because that's what core JS calls it.
>     
>     [1] 
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach

After the discussion over https://reviews.apache.org/r/12830/, I replaced the 
`angular.forEach` calls with `_.each` again until Underscore is replaced with 
native calls.


- Ross


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12832/#review23870
-----------------------------------------------------------


On July 23, 2013, 2:15 a.m., Ross Allen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12832/
> -----------------------------------------------------------
> 
> (Updated July 23, 2013, 2:15 a.m.)
> 
> 
> Review request for mesos.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Iterate over all offers only once
> 
> Offers are first appended to "$scope.offers" while iterating over each
> framework, and then "$scope.offers" is iterated to calculate stats. The
> stats can instead be calculated at the same time the offers are
> appended to "$scope.offers" to save an iteration.
> 
> 
> Diffs
> -----
> 
>   src/webui/master/static/js/controllers.js 
> dae12b61001ff0c7379169242e5d125ef6ca141b 
> 
> Diff: https://reviews.apache.org/r/12832/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ross Allen
> 
>

Reply via email to