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: a07f3367d7,86b57370403509bc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Disabling string evaluation in a logging system 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: <15grablk8asle$.z2pjxbkmcyhz.dlg@40tude.net> <6b7b4465-3e08-4690-8318-10f58329ccfc@e21g2000vbl.googlegroups.com> <4bf283a8$0$6973$9b4e6d93@newsspool4.arcor-online.net> Date: Tue, 18 May 2010 14:54:49 +0200 Message-ID: <22f2hyo5aics$.a8l33y83t46.dlg@40tude.net> NNTP-Posting-Date: 18 May 2010 14:54:49 CEST NNTP-Posting-Host: ebcedd3e.newsspool1.arcor-online.net X-Trace: DXC=[fH@9oFFbSN6PJ?[X6JIXEic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBL8lJ>3=`J`C[6LHn;2LCVN7enW;^6ZC`D\`mfM[68DCCJ>El>U;4XGG X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:11724 Date: 2010-05-18T14:54:49+02:00 List-Id: On Tue, 18 May 2010 14:10:15 +0200, Georg Bauhaus wrote: > On 18.05.10 12:26, Dmitry A. Kazakov wrote: > >> BTW, it could be a statement, e.g. conditional call: >> >> when ; > > Wouldn't conditional expression work this way? > > Proc ((if Condition then This else That)); Yes, if we wanted to introduce a full-blown lazy evaluation in Ada. But then I wished a better, lighter syntax and cleaner semantics. procedure Write (Where : in out Log; Message : lazy String); BTW, another case for lazy evaluation is controlling side effects and evaluation order. E.g. function Read (From : access Stream) return Byte; function Read (From : access Stream) return Byte; function "&" (Left : Byte_Array; Right : lazy Byte) return Byte_Array; then: X : Byte_Array := Read (S) & Read (S); -- This is unambiguous -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de