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-20 00:42:31 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!news.crs4.it!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: Mon, 20 Oct 2003 09:42:10 +0200 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3F9391D2.9010106@crs4.it> References: <1064527575.648809@master.nyc.kbcfp.com> <3F739C1D.4030907@attbi.com> <3F78E850.8010401@comcast.net> <3F797748.3000203@noplace.com> <834clb.uan1.ln@skymaster> <3F7AC5B0.9080108@noplace.com> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: pietro.crs4.it 1066631216 26099 156.148.70.170 (20 Oct 2003 06:26:56 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 20 Oct 2003 06:26:56 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, In-Reply-To: <3F7AC5B0.9080108@noplace.com> Xref: archiver1.google.com comp.lang.ada:1182 Date: 2003-10-20T06:26:56+00:00 List-Id: Marin David Condic wrote: > O.K. But my question remains, "Does anybody use them in *practice*?" Yes. > 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. It is my experience that Unbounded_String is too heavy - both memory and processor wise - for some of my tasks (hundreds of thousands of strings), so I stick to Bounded_String there. But whenever it is a small task, where memory and processor footprint isn't a real problem, I am also lazy and just use Unbounded_String. > 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. I seem never to have enough Hertz and bytes to throw at my largest tasks... > 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? No. But there is definitely a "if Use_In_Arrays then Bounded_String" statement inside the "when Cares_About_Speed =>" and the "when Cares_About_Memory =>" branches. Jacob -- "I just might be wrong."