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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Tue, 28 Jul 2015 16:57:08 +0200 Organization: A noiseless patient Spider Message-ID: References: <1ckwx9hern944$.1w0k6fbvlqo62$.dlg@40tude.net> <1ipfeas9434z5.o8661mp0cpkh.dlg@40tude.net> <75a31df9-801e-4e7f-8e29-403c0650c891@googlegroups.com> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 28 Jul 2015 14:55:36 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="8488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+v8cuWmkVvnQrPeuHABMjdQBmnp808EYI=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: Cancel-Lock: sha1:5R93AbONPWZ0R2PdYKggFNHeRNQ= Xref: news.eternal-september.org comp.lang.ada:27090 Date: 2015-07-28T16:57:08+02:00 List-Id: On 28.07.15 15:49, EGarrulo wrote: > In this case, a deficiency of Ada is that Ada doesn't allow you to > evaluate an expression lazily. Let's imagine that Ada had a `lazy` > keyword to evaluate an expression lazily. Then I could have written: > > Trace (Me, lazy "Performing Step " & Step(...)); > > without any need for a preprocessor. A poor man's solution could establish a Boolean context and then (i.e., after declaring DBG : Boolean) DBG := Trace(Me) and then Log("performing Step " & Step(42)); (where the Log function, if called, has the side effect of printing its parameter.)