Re: Shortcut Booleans

Liste des GroupesRevenir à cl c  
Sujet : Re: Shortcut Booleans
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.c
Date : 10. Jun 2024, 03:51:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v45m72$2pe8$1@dont-email.me>
References : 1 2 3 4
User-Agent : Pan/0.158 (Avdiivka; )
On Sun, 9 Jun 2024 13:35:12 +0200, David Brown wrote:

In general, it would be inconvenient if you did not know whether "a @ b"
was going to evaluate "b", including all function calls and
side-effects.

Ada has “and then” and “or else”, so that you can specifically request
shortcut evaluation when program correctness depends on it, and leave it
up to the implementation otherwise.

This principle could be extended to other situations ...

Date Sujet#  Auteur
7 Jun 24 * Shortcut Booleans6Lawrence D'Oliveiro
7 Jun 24 `* Re: Shortcut Booleans5bart
8 Jun 24  `* Re: Shortcut Booleans4Lawrence D'Oliveiro
9 Jun 24   `* Re: Shortcut Booleans3David Brown
10 Jun 24    `* Re: Shortcut Booleans2Lawrence D'Oliveiro
10 Jun 24     `- Re: Shortcut Booleans1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal