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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news4.google.com!news2.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) Date: Fri, 05 Sep 2008 10:14:47 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> <12prmxev8newf.lvc4m055okkb$.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1220624087 30909 192.74.137.71 (5 Sep 2008 14:14:47 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 5 Sep 2008 14:14:47 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:Coi8vlO+HM2enDXlzknkTdvVCtA= Xref: g2news1.google.com comp.lang.ada:1946 Date: 2008-09-05T10:14:47-04:00 List-Id: stefan-lucks@see-the.signature writes: >> >> Nevertheless Boolean logic /= Belnap logic, though the former is contained >> >> in the latter. >> > >> > I never said "Boolean logic", I said "logic", which was ment to include >> > multi-valued logic. ;-) >> >> There are many multi-valued logics. > > You are trying to build an overly complex theory, which I am not > interested in. The issue is very simple: > > 1. If the A- or the B-part in "if A and B" raises an exception, but the > other part is false, the "right thing" (TM) to do would be to transfer > control to the else clause (or below "end if", when there is no else). > The intermediate result can be viewed as a three-valued logic > expression, but the final outcome of the Boolean expression must be > Boolean, of course. > > 2. If both raise A and B an exception, of if one raises an exception and > the other one is true, an exception is propagated. (*) > > 3. I would be willing to pragmatically sacrifice mathematical purity for a > shortcut rule: If A is false, the expression is false, whatever B does. > If A raises an exception, of if A is true and B raises an exception, > the exception is propagated. Some more questions about 3. Do you want to say that "and" is not a function (just like "and then" is not a function)? So you can't pass "and" as a generic formal parameter, pass it as a downward closure to an iterator, or rename it? Or are you saying that if "and" is passed to a generic formal function called Mumble, then Mumble gets this special property (of not evaluating its second argument in some cases)? Do you want that "and" on array-of-Boolean is no longer defined in terms of "and" on each component pair? (There's no such thing as "and then" on arrays.) Same question for modular "and". Or maybe just eliminate these other "and" operators? Do believe that "0 * F(X)" should return 0, even if F raises an exception? Must return 0, or might return 0? I'm just trying to explore the consequences of this seemingly-simple language design choice. It doesn't seem so simple to me. - Bob