Hacker News new | ask | show | jobs
by ggggtez 2144 days ago
While we're being pedantic, "do" is a terrible keyword. I mean, everything in an imperitive program is a request to "do" something.

And "do ... while(x)" is a terrible construct because it hides the loop complexity far from the place where a programmer needs to see it.

2 comments

The condition of a C-like do/while loop is exactly where the programmer needs to see it: where it's evaluated. Same with the plain while loop.
> "do" is a terrible keyword.

Not at all. "do" helps a lot to make the code read like English and thus more understandable.