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: a07f3367d7,c689b55786a9f2bd 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.mixmin.net!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Fri, 7 May 2010 16:11:37 -0500 Organization: Jacob Sparre Andersen Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1273266698 16544 69.95.181.76 (7 May 2010 21:11:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 7 May 2010 21:11:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:11396 Date: 2010-05-07T16:11:37-05:00 List-Id: "Robert A Duff" wrote in message news:wccd3x7lww8.fsf@shell01.TheWorld.com... > "Randy Brukardt" writes: > >> I actually don't buy the need for the Assert pragma in the first place: >> such >> checks are rarely expensive and thus should simply be part of the code >> always. > > If they're not expensive, then you're not using it enough. ;-) If they're expensive, they have to be programmed and debugged like any other code. That causes extra work, which is the exact opposite of what an agile programmer would do. (And I've been an agile programmer long before anybody defined the technique or made lots of money selling seminars about it.) > Also, the other advantage of pragma Assert over an Assert > procedure is that you can put the pragma in declarative parts > and package specs. True, although I have sometimes used functions and dummy constants for that purpose. (They'd have to be declared "volatile" in order to be portable, I guess; it doesn't matter for Janus/Ada since we never eliminate objects or their last write.) >>... (And the ones that are expensive need a lot more control than simply >> on or off: Janus/Ada uses trace switches that can be controlled on a >> per-unit basis.) > > Sorry, I don't buy that sort of argument in general: If you want to > do (simple) X, you probably also want (complicated) Y, so we're > not going to allow X. No, that's not my argument at all. "Simple X" in this case is useless or even harmful. You *have to* do compilacated Y, otherwise you are are only using the seat belts in the garage. It almost never makes sense to turn these things off, so why even have the capability? It's like giving everyone a shotgun but telling them never to use it. Anyway, I realize that you have said that you don't believe in the "seat belt" analogy. As such, there is really no point in arguing with you on this topic: we don't even agree on the arena of discourse. Randy.