From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-06 15:27:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Alexandre E. Kopilovitch" Newsgroups: comp.lang.ada Subject: Re: Certified C compilers for safety-critical embedded systems Date: Wed, 7 Jan 2004 02:14:18 +0300 (MSK) Organization: Cuivre, Argent, Or Message-ID: References: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1073430830 1930 80.67.180.195 (6 Jan 2004 23:13:50 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 6 Jan 2004 23:13:50 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: ; from Jean-Pierre Rosen at Tue, 6 Jan 2004 15:14:44 +0100 X-Mailer: Mail/@ [v2.44 MSDOS] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:4158 Date: 2004-01-07T02:14:18+03:00 Jean-Pierre Rosen wrote: > > Of course, functions can have side effects; now they just have > > to lie about it! > I've seen this argument quite often (especially by RBKD), but it is totally > bogus. Nobody claimed that functions should not have side effects, but only > that functions compute a result given some parameters and the global state > of the program. It was felt that it was OK for a function to modify the > global state, but modifying the parameters would be surprising and error-prone. But the problematic cases are exactly those where a variable belonging to the global state is passed by/represented as a parameter - and here the contradiction appears: from one side it may be computed (changed) by the function as it is a part of the global state, but from another side it shoudn't be changed by the function as it is a parameter. So I don't think that that argument is bogus, it has a real controversy as its ground. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia