[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python or Perl for a Debian maintainance project?

>>>>> "Philip" == Philip Brown <phil@bolthole.com> writes:

    Philip> An alternative method in C, if you dont want to write a new
    Philip> function, is to fake one in-line, using a one-shot while loop.
    Philip> No goto required. Just an indent level.  Which has a nice side
    Philip> effect of very clearly demarking, "Hey, something special is
    Philip> going on here" (ie: I'm HOLDING A LOCK)

    Philip> ... (Do-while/break trick skipped)

Under the nice-looking surface, I think the code is somewhat too dangerous:
if you suddenly have to do some of the statements there more than once and
add a while-loop around them, the break statement suddenly changes the
semantics to break the while loop instead of the do loop (and perhaps I'm
too bad as a programmer: that happened to me quite a few times).


Reply to: