Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine value of range based loops #96

Open
stevehalliwell opened this issue Jan 27, 2022 · 6 comments
Open

Determine value of range based loops #96

stevehalliwell opened this issue Jan 27, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@stevehalliwell
Copy link
Owner

Such as for 0..100

@stevehalliwell stevehalliwell added the enhancement New feature or request label Jan 27, 2022
@stevehalliwell
Copy link
Owner Author

stevehalliwell commented Jun 29, 2022

Most likely naturally follows or simul #97

@stevehalliwell
Copy link
Owner Author

for(var i = 0; i < 10; i+=1) could become range (10) {}
and step size being for(var i = 0; i < 10; i+=2) range (10,2) {}
with options for starting value of non 0 being for(var i = 1; i < 11; i+=1) range (1,11,1) {}

@stevehalliwell
Copy link
Owner Author

Ranges would be fixed count, where loop over native list is dynamic count.

@stevehalliwell
Copy link
Owner Author

Range will still need to be able to provide a name for the index, so a full delcare might need something like range (i,0,10,1) {} makes this tricky

@stevehalliwell
Copy link
Owner Author

Yep, hit this enough that it would be nice to simply range 3 {} or repeat spawnCount {}

@stevehalliwell
Copy link
Owner Author

This would now be sugar that degrades to a for loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant