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 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!ecngs!feeder.ecngs.de!news.k-dsl.de!feed.xsnews.nl!border-3.ams.xsnews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.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="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <15grablk8asle$.z2pjxbkmcyhz.dlg@40tude.net> <6b7b4465-3e08-4690-8318-10f58329ccfc@e21g2000vbl.googlegroups.com> Date: Tue, 18 May 2010 12:26:21 +0200 Message-ID: NNTP-Posting-Date: 18 May 2010 12:26:21 CEST NNTP-Posting-Host: b47a816c.newsspool4.arcor-online.net X-Trace: DXC=IE7`3IlI7^L@k=MdN::NBI4IUKBnB X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:11715 Date: 2010-05-18T12:26:21+02:00 List-Id: On Tue, 18 May 2010 02:45:35 -0700 (PDT), Cyrille wrote: > On May 18, 10:15�am, "Dmitry A. Kazakov" > wrote: > >> But if I were to make a proposal, then I would do the useless pargma Assert >> useful. E.g. >> >> � �pragma Assert (Condition, Message); >> >> [Change] >> Dynamic semantics: Message is evaluated only if Condition is evaluated to >> true. Then a user-defined assertion handler is called, if any (to be set by >> Assertion_Policy). Otherwise Assertion_Error is propagated. > > something like pragma Check & Check_Policy in GNAT, right? Important is laziness in the evaluation of the message expression. Switching off by compiler is rather a disadvantage, because logging is to be configured dynamically. BTW, it could be a statement, e.g. conditional call: when ; A similar thing is badly needed for declarations as well, e.g. awful: if Object in T'Class then declare T_Object : T'Class renames T'Class (Object); begin ... end; end if; (cannot invent any good syntax for that) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de