You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that Bitcoin Cash is going to get increased VM limits, it becomes more plausible developers will want to use 'unrolled loops'. This would just be code repeated x times where x is known at compile time and cannot be a variable. The looping construct will only be able to take a number argument, not a variable.
If we were to enable it, the syntax should make clear to the developer that this loop will be unrolled in size and so any if branching logic will take up a huge amount of space. Either the keyword unroll or unroll for would make this very clear.
unroll(256) {
// Code to be unrolled and repeated 256 times
}
If people want to have a counter variable they would need to create this explicitly
int i =0; // Initialize a counter variableunroll(256) {
// Increment the counter explicitly
i = i +1;
}
The text was updated successfully, but these errors were encountered:
Now that Bitcoin Cash is going to get increased VM limits, it becomes more plausible developers will want to use 'unrolled loops'. This would just be code repeated x times where x is known at compile time and cannot be a variable. The looping construct will only be able to take a number argument, not a variable.
If we were to enable it, the syntax should make clear to the developer that this loop will be unrolled in size and so any if branching logic will take up a huge amount of space. Either the keyword
unroll
orunroll for
would make this very clear.If people want to have a counter variable they would need to create this explicitly
The text was updated successfully, but these errors were encountered: