comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Access to strings and string subtypes?
Date: 2000/03/17
Date: 2000-03-17T00:00:00+00:00	[thread overview]
Message-ID: <8atgul$i7l$1@nnrp1.deja.com> (raw)
In-Reply-To: 2000Mar17.070235.1@eisner

In article <2000Mar17.070235.1@eisner>,
  Kilgallen@eisner.decus.org.nospam wrote:

No one has answered the original question of WHY this annoying
limitation is in Ada95. It is a (misguided in my opinion)
worry about efficiency. It allows implementations to omit
templates on objects with explicit bounds to save a little
bit of space.

I never liked this nasty restriction, because it means that

 x : aliased string := "hello";
 x : aliased string (1 .. 5) := "hello";

are very different. And as a result you get into a Fortran
like situation of having to count the length of your strings.
The idea in Ada 83 was simply to allow you to omit the bounds
where they are clearly unnecessary, but in Ada 95, the aliased
glitch means that the omission of bounds has far more subtle
effects.

This is indeed a common confusion, which is why we went to the
trouble of giving explicit advisory warnings here.

Robert Dewar
Ada Core Technologies

P.S. if you can't use unauthorized software (which seems a
reasonable rule, we have the same rule at ACT), then perhaps
you should get an authorized copy of GNAT (we will be happy
to tell you how at sales@gnat.com :-)


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-03-17  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-16  0:00 Access to strings and string subtypes? Steve Folly
2000-03-16  0:00 ` Ehud Lamm
2000-03-16  0:00   ` Steve Folly
2000-03-17  0:00     ` Ehud Lamm
2000-03-17  0:00       ` Larry Kilgallen
2000-03-17  0:00         ` Robert Dewar [this message]
2000-03-17  0:00           ` Robert A Duff
2000-03-18  0:00             ` Robert Dewar
2000-03-20  0:00               ` Tucker Taft
2000-03-17  0:00       ` Steve Folly
2000-03-17  0:00         ` Pascal Obry
  -- strict thread matches above, loose matches on Subject: below --
2000-03-17  0:00 Christoph Grein
replies disabled

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