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:17:01 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: <3F7AC5B0.9080108@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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Oct 2003 12:17:01 GMT NNTP-Posting-Host: 165.247.66.46 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1065010621 165.247.66.46 (Wed, 01 Oct 2003 05:17:01 PDT) NNTP-Posting-Date: Wed, 01 Oct 2003 05:17:01 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:60 Date: 2003-10-01T12:17:01+00:00 List-Id: O.K. But my question remains, "Does anybody use them in *practice*?" When I've needed a record field for something like Person_Name and wanted some fixed allocation on it, I use a String and if/when I needed to know where the string stopped, I use a "Last_Non_Blank ()" function. But in most of the instances where I need something like this, I just jump to Unbounded_String and am done with it. I understand that Bounded_String has some technical advantages, but in my experience, the instant I'm on a PC at some astronomical number of megahertz/gigahertz with more memory than I can shake a stick at, Unbounded_String and all its technical disadvantages compared to Bounded_String just seem to not amount to a warm bucket of spit. Hence I'm wondering if people actually have/do use it on anything like a regular basis. Maybe I'm unusual and most Ada programmers make use of Bounded_String thirteen times a day. My usual question is: "Do I care about speed or determinism in this application?" When "Yes" => String; When "No" => Unbounded_String; Do other programmers have a When "Maybe" => Bounded_String; branch? I'm sure we could sit here all day and dream up circumstances when Bounded_String might make some sense, but I'm wondering if in real-world experience, people make use of it. Remember that one of the motivations behind RISC architectures was that researchers discovered that in some instances, specific CISC architecture instructions were not being exploited at all by compilers and started asking the question "Should we waste the silicon to implement it if nobody is using it?" That's the question I'm asking here. MDC Jean-Pierre Rosen wrote: > They are great if you want an abstract data type *implemented as* as string of variable length. > > For example, if you have Person_Name, Person_Address, etc. > You want them to be different types, they have a maximum length, and > a variable current length. Instead of deriving from String, you get these > types by an instantiation of Bounded_String. > -- ====================================================================== 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 ======================================================================