Sat, 30 Oct 1999 20:26:04 +0200
|
Mark Lundquist schrieb:
> ... This is precisely my answer to "Ada isn't portable because
> you don't even know how big an Integer is" (for instance). Portability
> doesn't mean identical behavior, it means that you can deploy under a
> different implementation of the language system without changes to the
> source text and the requirements of the system continue to be met. If I
> say (to continue the example)
>
> X: Integer;
>
> instead of using an implementation-independent integer type, this is an
> implicit statement that "I do not care about the range of values of this
> object"; that is, it has no bearing on the system requirements. You
> should be able to say that, because there are a lot of times when you
> really don't care (so for instance, the fact that you run out of
> integers sooner on some platform is no more of a "portability" concern
> than when you run out of memory or disk space! :-)
>
>
...
> > It's all but impossible to avoid the use of Standard types; for example,
> > Integer is the index type for String (a bad decision made in Ada 83).
>
> Good point.
>
> To stray from the topic for a bit -- the low level of abstraction of
> String does seem to cause some problems, beginning in Ada95.
>
I see a contradiction in these two statements. I do not care for the range of
Integer when I use Strings. Who would use indices such that a program runs
with 32 bit integers but doesn't for 16 bit? If such ranges are needed, it
seems to me that one would also run out of memory when using a machine
where one doesn't have 32 bits.
And where in Ada95 does the 'low level abstraction' lead to problems?
What would be a 'high level abstraction'? We have Ada.Strings.Fixed,
-Bounded, -Unbounded.
I'm certainly missing something...
[To me, some people seem to be very paranoid about predefined types.
Don't you dare write "type Something is array (1..10);" - that's bad and
not portable; "type Something is array (Integer_8 range 1..10);" however
is very good and portable.]
o _ _ _
--------- __o __o /\_ _ \\o (_)\__/o (_)
------- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/
------ (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mein Radunfall
My bike accident
Christoph Grein
Mitglied von Ada-Deutschland
Member of Ada Germany
http:/www.ada-deutschland.de
http://home.T-Online.de/home/Christ-Usch.Grein
eMail: [log in to unmask]
|
|
|