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-09-30 14:01:37 PST Path: archiver1.google.com!news2.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!wn13feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3F79EF18.7060600@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: <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 NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc53 1064955696 24.34.139.183 (Tue, 30 Sep 2003 21:01:36 GMT) NNTP-Posting-Date: Tue, 30 Sep 2003 21:01:36 GMT Organization: Comcast Online Date: Tue, 30 Sep 2003 21:01:36 GMT Xref: archiver1.google.com comp.lang.ada:36 Date: 2003-09-30T21:01:36+00:00 List-Id: Jean-Pierre Rosen wrote: > 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. 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. If you want a subtle point to discuss though, should the I/O operations for Unbounded_String and instances of Bounded_String be symmetric, and symmetrically located? My inclination is that Get and Put for Bounded_String belong in Ada.Strings.Bounded_String, but Get_Line for Unbounded_String belongs in Ada.Text_IO... -- 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