comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Ragged Array Proposal
Date: 1999/09/22
Date: 1999-09-22T00:00:00+00:00	[thread overview]
Message-ID: <7satei$e2q$1@nnrp1.deja.com> (raw)
In-Reply-To: 37e7c08e@eeyore.callnetuk.com

In article <37e7c08e@eeyore.callnetuk.com>,
  "Nick Roberts" <nickroberts@callnetuk.com> wrote:
> I have set up a WWW site, and posted an article on it detailing a
first
> draft of my proposal for a 'ragged array type' extension to the
language.
> The URL is:
>
> http://www.callnetuk.com/home/nickroberts
>
> Do please take a look.
>
> I seem to get the impression that the cognoscenti consider this
> particular idea worthless. I am perfectly serious about it, however;

I would have used the word "excessive" rather than "worthless". But then
again, I probably wouldn't count as a cognoscentum.

One thing confuses me about your proposal. You say that when the array
is declared all the elements will be constrained. But then you say that
you can dynamicly change elements. Are you saying that if I try to
assign a 5 character string into an array element that is a 4 character
string, the compiler would accept it? If so, how about if a function
returns a 5 character string? Or how about if the 4 character string
element in the ragged array is passed into a subprogram as an "out" or
"in out" parameter?

Also for your example you say "the various ways of doing the equivalent
thing in Ada 95 are all unappealing." I but I can do the equivalent
thing in Ada 95 in only 2 more lines of code:

   type Command_String_Ptr is access all String;
   for Command_String_Ptr'Storage_Size use 1024;

   type Command is (Cut, Copy, Paste, ...);

   Labels: constant array (Command) of Command_String_Ptr :=
      (Cut      => new String'("Cu&t"),
       Copy     => new String'("&Copy"),

       Paste    => new String'("&Paste"),
       ...);

Admittedly I have to keep watch that I leave enough space in the pool
for all the command strings. But if this is in an outer block on a
virtual memory OS (by far the typcial case), I don't even need the "for"
clause.

Anyway, perhaps you should explain in the proposal why this approach is
unappealing vs. complicating the language.

On the plus side, I find the proposal's visual layout, as well as that
of the rest of your website, quite visually appealing. I hope it won't
be too much of a challange to maintain that standard as your website
grows.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




       reply	other threads:[~1999-09-22  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 ` Ted Dennison [this message]
1999-09-22  0:00   ` Ragged Array Proposal Ray Blaak
1999-09-23  0:00     ` Ted Dennison
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-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
replies disabled

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