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,56525db28240414a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.103.197 with SMTP id fy5mr808695wib.1.1343789459516; Tue, 31 Jul 2012 19:50:59 -0700 (PDT) Received: by 10.66.87.74 with SMTP id v10mr3280334paz.36.1343789444418; Tue, 31 Jul 2012 19:50:44 -0700 (PDT) Path: n2ni19314846win.0!nntp.google.com!feed-C.news.volia.net!volia.net!news2.volia.net!feed-A.news.volia.net!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!xlned.com!feeder3.xlned.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.85.216.87.MISMATCH!r1no8392357qas.0!news-out.google.com!g9ni9241255pbo.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Efficient Sequential Access to Arrays Date: Thu, 26 Jul 2012 20:49:34 +0200 Organization: cbb software GmbH Message-ID: References: <87ipdf4vh6.fsf@mid.deneb.enyo.de> <4ce44d2d-d789-42a0-a6ed-035f7f8d58be@googlegroups.com> <1d20andzhb0rk.ytxhpkza8tky$.dlg@40tude.net> <6ov218tnkbqu3vpkuo4t77rd7de0a3aesf@invalid.netcom.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 X-Received-Bytes: 2437 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-07-26T20:49:34+02:00 List-Id: On Thu, 26 Jul 2012 13:35:46 -0400, Dennis Lee Bieber wrote: > My prior job had a, uhm, valid use for 'Valid... the code had to > receive data structures generated externally (and passed through half a > dozen converters from hardware signal pins to software emulation), along > with receiving "commands" from test engineers that came from some > database (converting text string into enumeration values). > > A mismatch between the software build and the database could result > in an (currently) invalid representation/enumeration value being passed > in. I know this case well because getting data out/into hardware is my daily job. I do not consider it legitimate for 'Valid. To put it clearer, I don't see re-interpretation of some bit pattern a good design. Which is what actually happens before 'Valid. It is always worth 10ns or so CPU time of doing proper conversion or value construction per arithmetic operations instead. It is not only cleaner, it is also safer, because 'Valid is a very illusory protection against mangled input. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de