Liste des Groupes | Revenir à cl c |
On Thu, 12 Dec 2024 14:44:54 +0200, Michael S wrote:On Wed, 11 Dec 2024 17:27:53 -0800
Keith Thompson > wrote:
bart > writes:>
[...]My experience of multi-level break is that there are two main
use-cases:
>
* Used in the current loop only (not necessarily the innermost
to an observer). This is the most common
>
* Used to exit the outermost loop
>
So to support these, named or even numbered loops are not
necessary. (Eg. I use 'exit' or 'exit all'.)
I would oppose a change to C that only applied to innermost and
outermost loops. For one thing, I'm not aware of any other
language that does this (except perhaps your unnamed one). For
another, it's easy enough to define a feature that handles any
arbitrary nesting levels, by applying names (labels) to loops.
The better solution is education.
Convince teachers in unis and colleges that goto is *not* considered
harmful for this particular use case. Convince them to teach that
goto is not harmful in every case, if the people that write it, indent
that goto significally and have clear in mind and in the text, what
that goto has to do
Les messages affichés proviennent d'usenet.