Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #385486

Re: C23 thoughts and opinions

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: C23 thoughts and opinions
Date 2024-06-03 13:31 -0700
Organization A noiseless patient Spider
Message-ID <864ja9ojit.fsf@linuxsc.com> (permalink)
References (2 earlier) <v3dkgh$2e0me$1@dont-email.me> <v3gou9$36n61$3@dont-email.me> <v3hrq7$1o743$1@news.xmission.com> <v3i7u3$3bp0v$1@dont-email.me> <20240602124448.704@kylheku.com>

Show all headers | View raw


Kaz Kylheku <643-408-1753@kylheku.com> writes:

> On 2024-06-02, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
>
>> I've always considered
>>   for (;;)
>> preferable over
>>   while (1)
>
> Of course it is preferable.  The idiom constitutes the language's direct
> support for unconditional looping, not requiring that to be requested by
> an extraneous always-true expression.
>
> Using while (1) or while (true) is like i = i + 1 instead
> of ++i, or while (*dst++ = *src++); instead of strcpy.  [...]

Using for (;;) for an infinite loop is an abomination.  Anyone
who advocates following that rule is an instrument of Satan.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: C23 thoughts and opinions Lynn McGuire <lynnmcguire5@gmail.com> - 2024-05-31 17:55 -0500
  Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-01 15:30 +0200
  Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-02 03:29 +0000
    Re: C23 thoughts and opinions Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-01 23:31 -0700
    Re: C23 thoughts and opinions gazelle@shell.xmission.com (Kenny McCormack) - 2024-06-02 13:24 +0000
      Re: C23 thoughts and opinions Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-06-02 16:51 +0000
        Re: C23 thoughts and opinions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-02 19:52 +0000
          Re: C23 thoughts and opinions Michael S <already5chosen@yahoo.com> - 2024-06-03 12:01 +0300
          Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-03 13:31 -0700
            Re: C23 thoughts and opinions "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-03 14:02 -0700
              Re: C23 thoughts and opinions gazelle@shell.xmission.com (Kenny McCormack) - 2024-06-03 21:48 +0000
                Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-04 10:36 +0200
                Re: C23 thoughts and opinions "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-06-04 14:47 -0700
          Re: C23 thoughts and opinions bart <bc@freeuk.com> - 2024-06-03 23:43 +0100
            Re: C23 thoughts and opinions Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-06-03 16:23 -0700
              Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-04 10:47 +0200
            Re: C23 thoughts and opinions Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-04 02:20 +0000
              Re: C23 thoughts and opinions David Brown <david.brown@hesbynett.no> - 2024-06-04 10:47 +0200
            Re: C23 thoughts and opinions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-06-04 05:25 +0000
        Re: C23 thoughts and opinions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-06-03 13:29 -0700

csiph-web