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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-02 13:03:16 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!elnk-nf2-pas!newsfeed.earthlink.net!wn14feed!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F7C8482.20102@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? References: <3F7AC5B0.9080108@noplace.com> <3F7B7641.9030908@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc52.ops.asp.att.net 1065124996 24.34.139.183 (Thu, 02 Oct 2003 20:03:16 GMT) NNTP-Posting-Date: Thu, 02 Oct 2003 20:03:16 GMT Organization: Comcast Online Date: Thu, 02 Oct 2003 20:03:16 GMT Xref: archiver1.google.com comp.lang.ada:132 Date: 2003-10-02T20:03:16+00:00 List-Id: Marin David Condic wrote: > I'm not saying you're wrong. Just that in most practical circumstances, > nobody cares. Hence, the question: "Does anybody really need > Bounded_String?" Yes, as I said, in database work, the nice thing about instantiating Bounded_String for each data dictionary string item is that the value gets checked for validity at the right point--where it can be fixed. Once you have validated it, the string is never going to grow outside the bounds, so you don't have to worry about checking again. In other words, the visible interface of the package that deals with say surnames may be: package Surnames is type Surname is private; function To_Surname(S: in String) return Surname; function Get(S: in Surname) return String; private... The only legitimate way to create a surname is by calling To_Surname, which does the error checking. -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig