Liste des Groupes | Revenir à cl c |
Personally, I'm in the "while (true) { ... }" camp. To me, "for (;;)" looks like a weird smiley, and I do not fall for any appeals to Deniis Ritchie's authority.Writing for (;;) is what I personally tend to write, however if a team does not like that, well, I will use while (true), or whatever... I think I tend to write for (;;) because I can adapt it for something like:
But we are missing another option:Still worry about run away recursion...
void mainloop() {
// do something
mainloop();
}
That should be fine with an optimising compiler.
Les messages affichés proviennent d'usenet.