comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Ragged Array Proposal
Date: 1999/09/28
Date: 1999-09-28T00:00:00+00:00	[thread overview]
Message-ID: <7spf1n$edh$1@nnrp1.deja.com> (raw)
In-Reply-To: 7so0i4$d8j$1@nnrp1.deja.com

In article <7so0i4$d8j$1@nnrp1.deja.com>,
> Fruits : constant array (Positive range <>) of
> Ada.Strings.Unbounded.Unbounded_String :=
>    (Ada.Strings.Unbounded.To_Unbounded_String("Apple"),
>     Ada.Strings.Unbounded.To_Unbounded_String("Orange"),
>     Ada.Strings.Unbounded.To_Unbounded_String("Pear"),
>     ...);

I can't *imagine* why you think that obviously redundant
qualification makes your code more readable. It is obvious
that the names in Unbounded have been chosen to be appropriate
for use with USE clauses (otherwise the name would have been
something like From_String, without the Unbounded in the name).

I perfectly understand the thought that generally likes to avoid
USE clauses, but I must say when people carry this to absurd
extremes like the above, it is hard to understand the thought
process involved.

Clearly no one would reuse the name To_Unbounded_String in a
user defined package (if they had any sense at all), so the
unqualified name is perfectly clear in practice.

Certainly we cannot buy an argument for a feature which goes
like this:

1. I refuse to use USE clauses

2. Therefore some code I have to write looks awful

3. Therefore I need some special feature in the language to
allow me to do this in some special way

:-)

Of course in this particular case, even the simple name
To_Unbounded_String is heavy, which is why the idea of a light
conversion operator makes good sense (the unary "+" suggestion).


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




      parent reply	other threads:[~1999-09-28  0:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <37e7c08e@eeyore.callnetuk.com>
1999-09-22  0:00 ` Ragged Array Proposal Ted Dennison
1999-09-22  0:00   ` Ray Blaak
1999-09-23  0:00     ` Tucker Taft
1999-09-23  0:00       ` Nick Roberts
1999-09-23  0:00         ` Hyman Rosen
1999-09-24  0:00           ` Nick Roberts
1999-09-24  0:00             ` Hyman Rosen
1999-09-25  0:00               ` Robert Dewar
1999-09-27  0:00                 ` Hyman Rosen
1999-09-27  0:00                   ` Brian Rogoff
1999-09-28  0:00                   ` Robert Dewar
1999-09-24  0:00         ` Robert Dewar
1999-09-24  0:00           ` Wes Groleau
1999-09-25  0:00             ` Robert Dewar
1999-09-25  0:00             ` Robert Dewar
1999-09-24  0:00         ` Ted Dennison
1999-09-24  0:00           ` Nick Roberts
1999-09-24  0:00       ` Robert Dewar
1999-09-23  0:00     ` Ted Dennison
1999-09-24  0:00     ` Robert Dewar
1999-09-23  0:00 ` Robert I. Eachus
1999-09-24  0:00   ` Nick Roberts
1999-09-25  0:00     ` Robert Dewar
1999-09-25  0:00     ` Robert Dewar
1999-09-25  0:00     ` Robert Dewar
1999-09-27  0:00     ` Ted Dennison
1999-09-27  0:00       ` Pascal Obry
1999-09-28  0:00         ` Ted Dennison
1999-09-28  0:00           ` Robert Dewar
1999-09-29  0:00             ` Geoff Bull
1999-09-28  0:00       ` Robert Dewar [this message]
replies disabled

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