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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.freenet.de!newsfeed.r-kom.de!news-nue1.dfn.de!news-lei1.dfn.de!news.uni-weimar.de!not-for-mail From: stefan-lucks@see-the.signature Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) Date: Tue, 2 Sep 2008 15:39:42 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> Reply-To: stefan-lucks@see-the.signature NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: tigger.scc.uni-weimar.de 1220358467 344 141.54.178.228 (2 Sep 2008 12:27:47 GMT) X-Complaints-To: news@tigger.scc.uni-weimar.de NNTP-Posting-Date: Tue, 2 Sep 2008 12:27:47 +0000 (UTC) X-X-Sender: lucks@medsec1.medien.uni-weimar.de In-Reply-To: Xref: g2news1.google.com comp.lang.ada:1864 Date: 2008-09-02T15:39:42+02:00 List-Id: > > And what would be an "invalid" side effect? > > A "valid" side effect would, e.g., be changing a global variable. On the > other hand, a function which raises an exception is essentially a function > returning some value outside its domain (but inside an extended domain). > This isn't quite like a side-effect -- only Ada pretends it is. To be clear, if "function F(...) return Boolean" may raise an exception, such as Constrained_Error, we essentially have a three-valued logic -- the function can return - either "true2, - or "false2, - or raise an exception, which is tantamount to returning "undefined". -- ------ Stefan Lucks -- Bauhaus-University Weimar -- Germany ------ Stefan dot Lucks at uni minus weimar dot de ------ I love the taste of Cryptanalysis in the morning! ------