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!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: and then... (a curiosity) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> Date: Tue, 2 Sep 2008 18:48:14 +0200 Message-ID: <8ri7op6v6seu$.1b4ix9f8iplyd$.dlg@40tude.net> NNTP-Posting-Date: 02 Sep 2008 18:48:14 CEST NNTP-Posting-Host: 1b677074.newsspool4.arcor-online.net X-Trace: DXC=;RAUgHSgP]Wf8j24CD<3lP4IUK On Tue, 2 Sep 2008 15:32:40 +0200, stefan-lucks@see-the.signature wrote: > A short-circuit "and" (instead of "and then") would not remove that choice > -- see the "much better style" above. Disagree. I think a far better idea would be to introduce pure functions and procedures with results. Functions with side effects and access parameters is an insanity. It is also worth to consider introduction of commutative, associative, inverse operations per contract. This would allow the compiler to prevent a procedure with the result from appearing in a commutative "and". The evaluation order of non-associative etc operations could be fixed. Later it would also allow to manage a combinatory explosion variants in multi-methods ("and", "or", "+", "*" etc). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de