traditional for loop, which use indexes: pattern description
rssh at gradsoft.com.ua
Sun Apr 26 08:03:58 PDT 2009
Good day, community.
It's about proposal about adding for of loop with access for index value.
Patterns can be reviewed at
So, what statistics we need:
1) How many for traditional loops we have at all.
2) How many for loops have form:
for(int i=0; i<x.length; ++i)
for(int i=0; i<x.size(); ++i)
i++ instead ++i
i=0 instead int i=0
in all combinations.
All of those loops we
So, how many such loops we have ? -- near 1/3 of all traditional loops.
3) for, where condition is like it.next()
4) for and while, where condition like it.next and which call remove.
Sum of 2 and 4 will give us number of optimizations for index loop proposal
I guess this is cover, but correct me If I wrong.
More information about the coin-dev