Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Passing values from structure arrays to a generic geometrical mean function Date: Fri, 27 Jan 2017 09:25:22 -0800 Organization: None to speak of Lines: 24 Message-ID: References: <8abfc054-e7c3-498c-a7b4-8e7471f57ac6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="7ccb5db651c5d414defb0728956f1471"; logging-data="7378"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rWbs9TgDpNr62lsn7962T" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:/SPzx5+Mh2/oGkyrjZgCcEiQWDY= sha1:eBMsL/y2nMQfAtabG7wUYyK5dHg= Xref: csiph.com comp.lang.c:102562 David Brown writes: [...] > Deterministic incorrect behaviour is certainly better than > non-deterministic incorrect behaviour. But it is not nearly as good as > a compile-time warning about the problem. [...] I think there are cases where non-deterministic incorrect behavior is better than deterministic incorrect behavior. Suppose a bug in a program causes it to produce a plausible but incorrect result. If it consistently produces that result, you might never detect the error. If different runs produce different results, some of them may be sufficiently bad to make the bug obvious. It depends, in part, on whether testing can reliably reveal the problem before the code goes into production, and on the consequences of incorrect results -- and that can be arbitrarily complicated. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"