Automatic loop variables #70
Labels
brainstorming
Less of an issue, more of a place to kick around ideas.
compatibility-breaking
Making this change would break backward compatibility.
enhancement
A couple of different, maybe mutually exclusive ideas about automatically assigning variables within loops:
F
specifically, change the syntax to not require an explicit loop variable and assign the iteration value to some variable automatically. (This would be compatibility-breaking.)In both cases, nested loops would need to use different variables. Thoughts on what variables to use:
ijk
. Pros: stereotypical loop variables, already often used inF
loops;j
is currently unused. Cons: global variables wouldn't play well with recursion; default value ofi
as0
is often useful, might not want to overwrite that the moment a loop comes into the picture.edc
. Pros: hardly ever used. Cons: they do have a clear meaning already; that and the reverse alphabetical order could be confusing; local variables are harder to use in map/filter functions; unclear what to do if loops are nested more than five deep (though that seems pretty unlikely).The text was updated successfully, but these errors were encountered: