Join Slack
Powered by
Turns out you can omit the braces in `do {} while ...
# random
k
karelpeeters
11/06/2018, 10:34 PM
Turns out you can omit the braces in `do {} while ()`:
Copy code
do step() while(true)
n
napperley
11/07/2018, 12:00 AM
Isn't surprising since the same can be done with
if
,
else if
,
else
provided everything fits comfortably in a single line.
k
karelpeeters
11/07/2018, 12:00 AM
True, still feels dirty
simple smile
n
napperley
11/07/2018, 12:01 AM
Not really 🙃 . Just like many other language features it is open to abuse.
3
Views
Open in Slack
Previous
Next