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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-01 05:28:42 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!not-for-mail Message-ID: <3F7AC86E.90007@noplace.com> From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) 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: <1064527575.648809@master.nyc.kbcfp.com> <3F739C1D.4030907@attbi.com> <3F78E850.8010401@comcast.net> <3F797748.3000203@noplace.com> <834clb.uan1.ln@skymaster> <3F79EF18.7060600@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Oct 2003 12:28:42 GMT NNTP-Posting-Host: 165.247.66.46 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1065011322 165.247.66.46 (Wed, 01 Oct 2003 05:28:42 PDT) NNTP-Posting-Date: Wed, 01 Oct 2003 05:28:42 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:61 Date: 2003-10-01T12:28:42+00:00 List-Id: O.K. So you actually have, and do, use it in real applications. It makes a kind of good sense to say "I get this string from a database and it is always 80 bytes long at max, so I'll make a Bounded_String to match it." That's an issue of having to match the external reality while getting the most use you can from Ada's tools. When I've had circumstances such as this, I'd end up with a "String (1..80)" - mostly because I'd feel like I was spitting into the wind with respect to the rest of the language by using a Bounded_String and I probably couldn't read it directly into a Bounded_String anyway, so why bother with the conversion? It might depend some on how you intended to use the Bounded_String - lots of manipulation might make the rest of the package more handy, but if all you're going to do is pass it around and print it out, then String might work just as well. But do you use Bounded_String in circumstances where you get to design the whole thing from bottom-dead-center? (You don't have to match the external reality - you can create the external reality to suit your needs.) MDC Robert I. Eachus wrote: > > Exactly, I often use several instances of Bounded_String when working > with a database. Since the name or whatever does have a maximum length > it makes much more sense to limit it at the point of creation, where you > can handle errors in a more meaningful manner. -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m c o n d i c @ a c m . o r g "All reformers, however strict their social conscience, live in houses just as big as they can pay for." --Logan Pearsall Smith ======================================================================