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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Mon, 10 May 2010 16:18:47 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <4be3d4fb$0$7651$9b4e6d93@newsspool1.arcor-online.net> Injection-Date: Mon, 10 May 2010 16:18:47 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="12878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6OuGqXiL5LSU98LbOg2aCtpJ8+ri2Tpo=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:pJv2xN1WSGgMQnotET0fkgLi1B4= Xref: g2news2.google.com comp.lang.ada:11452 Date: 2010-05-10T16:18:47+00:00 List-Id: Georg Bauhaus expounded in news:4be3d4fb$0$7651$9b4e6d93 @newsspool1.arcor-online.net: .. > [1. mislead assumptions]. > If, as Bob has said, programmers discover 'Image before > they discover Text_IO.*_IO and Text_IO.Editing, then there > is something wrong, indeed---with Ada's appearance before > them! I know all about the instantiated Text_IO stuff. The prevailing thing here is that I use S'Image for debugging a lot (saves me from also having to track down instantiated packages when I want to remove it). Then there's the lazy part of me, that wanted to capitalize on what was already there. Shoot me for those reasons. I've forgotten some Ada, but I'm not a newb either. Although no super human effort by any means, I wrote the initial APQ binding, which I trust is now in good hands. > [2. 'Image *and* 'Value are paired and have a purpose, > or contract]. > Is 'Image a formatting function? I don't think so. It's convenient. I now often use: Put(Trim(My_Int'Image(I))); when necessary, where trim removes the blank. You can shoot me for that too. ;-) > You said you were too lazy to ... and therefore wanted > to adapt something half related to your purpose. Yep, that's me. > You might be doing yourself (and your readers) a disservice. Maybe, maybe not. I'm trying to strike a balance. > [3. Use normal Ada for polymorphism]. > If I wanted polymorphic behavior of numbers, Again, I need to avoid bloat. I have several numeric types involved. Many do not need I/O, but S'Image does get used a lot in debug code. > [4. no need]. > Why do Ada programmers forget Ada language > principles whenever it comes to basic values? :o( > Is it not obvious that using 'Image in ways it was not > intended to be used makes the program text misleading? > -- Georg >From the reader's pov, S'Image(I) is pretty obvious what it's going to do, including that extra blank! ;-) Thanks for your comments. Warren