comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: conversion
Date: Sat, 28 Jun 2003 02:55:33 GMT
Date: 2003-06-28T02:55:33+00:00	[thread overview]
Message-ID: <3EFD0424.4000905@spam.com> (raw)
In-Reply-To: mailman.21.1056734216.8204.comp.lang.ada@ada.eu.org

Andrew wrote:
> Ok, so I found the ada.strings.unbounded package spec and body and took a
> look
> at the definition and implementation of unbounded string.  Finally I found
> them!
> 
> Unbounded_string is basically an object that contains a reference to a
> string.

What you are discussing is one specific compiler's implementation of 
Ada.Strings.Unbounded.Unbounded_String. Other compilers may use other 
implementations. This may seem unlikely, but some compilers might treat 
objects of this type as a special case in order to speed up the memory 
management required for them.

Ada has so many ways to use type String that there are few cases when a 
variable-length string type is really needed. Many cases where other 
languages need a variable string can be handled very easily by Ada's 
type String, and many uses of Unbounded_String in Ada are more examples 
of laziness or unfamiliarity with Ada's capabilities than of a real need 
for a variable string.

This is similar to the case of pointers. Access types are needed much 
more rarely in Ada than in many other languages, especially C. People 
who are using a lot of access types, objects, and values in Ada are 
probably using the language ineffectively, frequently because that's the 
way they're used to doing things in other languages.

-- 
Jeff Carter
"I'm a lumberjack and I'm OK."
Monty Python's Flying Circus




  parent reply	other threads:[~2003-06-28  2:55 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-27 17:37 conversion Andrew
2003-06-27 17:32 ` conversion Stephen Leake
2003-06-28  2:55 ` Jeffrey Carter [this message]
     [not found] <002701c33e22$8e9deaf0$0201a8c0@win>
2003-06-29 20:15 ` conversion David C. Hoos, Sr.
  -- strict thread matches above, loose matches on Subject: below --
2003-06-29  9:41 conversion Andrew
2003-07-04 10:42 ` conversion Janeit
2003-06-28  8:46 conversion Andrew
2003-06-28  9:49 ` conversion Preben Randhol
2003-06-30 14:08 ` conversion Stephen Leake
2003-06-27 10:51 conversion Andrew
2003-06-27 12:22 ` conversion Dmitry A. Kazakov
2003-06-27 12:37 ` conversion Stephen Leake
2003-06-27 14:26   ` conversion Bill Findlay
2003-06-27 17:04     ` conversion Georg Bauhaus
2003-07-04  0:21     ` conversion Dave Thompson
2003-06-27 13:25 ` conversion Robert I. Eachus
2003-06-27 18:42   ` conversion tmoran
2003-06-27 14:49 ` conversion Matthew Heaney
2003-06-27 17:10 ` conversion Georg Bauhaus
2003-06-27 17:13 ` conversion Alexander Kopilovitch
2003-06-27 17:34   ` conversion Preben Randhol
2003-06-27 22:10     ` conversion Alexander Kopilovitch
2003-06-28  9:46       ` conversion Preben Randhol
2003-06-27 22:13   ` conversion Robert I. Eachus
2003-06-30  8:52     ` conversion Dmitry A. Kazakov
2003-07-03  7:03       ` conversion Robert I. Eachus
2003-07-09  7:42         ` conversion Dmitry A. Kazakov
2003-07-09 17:04           ` conversion Robert I. Eachus
2003-07-10 10:19             ` conversion Dmitry A. Kazakov
2003-07-11  1:56               ` conversion Alexander Kopilovitch
2003-07-05  2:40     ` conversion Alexander Kopilovitch
2003-07-05  6:33       ` conversion Georg Bauhaus
2003-07-05 17:06         ` conversion Alexander Kopilovitch
2003-07-06  3:53           ` conversion Robert I. Eachus
2003-07-06  5:13             ` conversion Jeffrey Carter
2003-07-06 12:45               ` conversion Chad R. Meiners
2003-07-07  1:09             ` conversion Alexander Kopilovitch
2003-07-06 20:04           ` conversion Georg Bauhaus
2003-07-07 14:55             ` conversion Stephen Leake
2003-07-07 21:36               ` conversion Alexander Kopilovitch
1998-07-22  0:00 conversion Rick
1998-07-22  0:00 ` conversion Corey Ashford
1998-07-22  0:00   ` conversion Corey Ashford
1998-07-22  0:00 ` conversion Richard Toy
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox