Re: C23 thoughts and opinions

Liste des GroupesRevenir à cl c 
Sujet : Re: C23 thoughts and opinions
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.lang.c
Date : 02. Jun 2024, 17:51:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3i7u3$3bp0v$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Sun, 02 Jun 2024 13:24:23 +0000, Kenny McCormack wrote:

In article <v3gou9$36n61$3@dont-email.me>,
Lawrence D'Oliveiro  <ldo@nz.invalid> wrote:
On Fri, 31 May 2024 17:55:13 -0500, Lynn McGuire wrote:
>
    while (1)
>
Why not
>
   while (true)
>
or even
>
   for (;;)
>
?

I've always considered
  for (;;)
preferable over
  while (1)
as the for (;;) expression does not require the compiler to expand
and evaluate a condition expression.

For the for (;;), the compiler sees the token stream <LPAREN>
<SEMICOLON> <SEMICOLON> <RPAREN>, and emits a closed loop, but
with while (1), the compiler sees <LPAREN> <CONSTANT> <RPAREN>,
and has to evaluate (either at compile time or at execution
time) the value of the <CONSTANT> to determine whether or or
not to emit the closed loop logic.

 
Or even:
 
:loop
    ....
goto loop

ITYM

  loop:
    /*Stuff happens here */
  goto loop;



--
Lew Pitcher
"In Skills We Trust"

Date Sujet#  Auteur
31 May 24 * Re: C23 thoughts and opinions20Lynn McGuire
1 Jun 24 +- Re: C23 thoughts and opinions1David Brown
2 Jun 24 `* Re: C23 thoughts and opinions18Lawrence D'Oliveiro
2 Jun 24  +- Re: C23 thoughts and opinions1Keith Thompson
2 Jun 24  `* Re: C23 thoughts and opinions16Kenny McCormack
2 Jun 24   `* Re: C23 thoughts and opinions15Lew Pitcher
2 Jun 24    +* Re: C23 thoughts and opinions13Kaz Kylheku
3 Jun 24    i+- Re: C23 thoughts and opinions1Michael S
3 Jun 24    i+* Re: C23 thoughts and opinions5Tim Rentsch
3 Jun 24    ii`* Re: C23 thoughts and opinions4Chris M. Thomasson
3 Jun 24    ii `* Re: C23 thoughts and opinions3Kenny McCormack
4 Jun 24    ii  `* Re: C23 thoughts and opinions2David Brown
4 Jun 24    ii   `- Re: C23 thoughts and opinions1Chris M. Thomasson
3 Jun 24    i`* Re: C23 thoughts and opinions6bart
4 Jun 24    i +* Re: C23 thoughts and opinions2Keith Thompson
4 Jun 24    i i`- Re: C23 thoughts and opinions1David Brown
4 Jun 24    i +* Re: C23 thoughts and opinions2Lawrence D'Oliveiro
4 Jun 24    i i`- Re: C23 thoughts and opinions1David Brown
4 Jun 24    i `- Re: C23 thoughts and opinions1Kaz Kylheku
3 Jun 24    `- Re: C23 thoughts and opinions1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal