Issue #13230 has been updated by matz (Yukihiro Matsumoto).

Status changed from Feedback to Rejected

You haven't explained the reason behind the proposal. We don't understand why you think it's "better".
If you think you can persuade us with real-world use-case, try to reopen the issue.

Matz.


----------------------------------------
Misc #13230: Better Do ... while structure
https://bugs.ruby-lang.org/issues/13230#change-64277

* Author: jzakiya (Jabari Zakiya)
* Status: Rejected
* Priority: Normal
* Assignee: 
----------------------------------------
I just saw this, and thought I'd pass it along.

http://ncomputers.org/suggestions/do%20while.cpp

```
Do ... while structure improvement
Sometimes the use of jumps such as: continue, break, goto, call to a function, etc. is necessary to avoid the execution of some instructions.

This is the case of the seed, warp and swap loops of this solution for the n queens problem.

To avoid the use of jumps or tricks like for(;;) if(condition)break; on some of these cases, we are suggesting the below improvement to the do ... while loop str


/* author: ncomputers.org */
int main(){
    // Allow initializers (extra improvement)
    do(bool condition=0){
        // Block A
    }while(condition){
        // Block B
        // Variables declared inside the initializer still visible
    }
    return 0;
}
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>