comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nickroberts@adaos.worldonline.co.uk>
Subject: Re: ASCL a doomed idea?
Date: Wed, 12 Dec 2001 01:39:06 -0000
Date: 2001-12-12T01:39:06+00:00	[thread overview]
Message-ID: <9v6cn5$dcfkh$1@ID-25716.news.dfncis.de> (raw)
In-Reply-To: 30wR7.37506$Yy.395982@rwcrnsc53

"Mark Lundquist" <mlundquist2@attbi.com> wrote in message
news:30wR7.37506$Yy.395982@rwcrnsc53...

> Look, you have said that you conceive of a list as a "store" into which
> things are written and out of which things are read.  Are you truly saying
> that if I write
>
>     Put_Line ("Hello, world");
>
> that you think of the thing I am passing as an instance of a kind such a
> store?

Yes indeedy! There are several programming languages in which a string is
explicitly a list. Think about LISP. It seems utterly bizarre and beyond all
reason to me to suggest that a string is not, in general, a kind of list.
It's a list of characters. Isn't that something a four-year-old would
understand? Talk about people coming from different planets!

I'm not talking about somebody's esoteric academic definition of a list, I'm
talking about ordinary everyday people's idea of a list. Most Ada
programmers are ordinary everyday people, and it is those programmers whom I
am considering when choosing names for the types and subprograms.

> > and what the heck is the problem with using the same
> > nomenclature for both (as far as possible) to help avoid confusing the
> > poor Ada programmer?
>
> The problem is, as Jeff says, that they are not the same thing, and in
> fact have little to do with each other.  So if anything, you're going to
> confuse people *more* if your nomenclature is at variance with standard
> terminology for lists (assuming that there is such a thing...).

I think my previous remark kills this one stone dead. A string is a kind of
list, ergo any string operation (that is not character-specific) is also a
list operation (this is to say nothing about the efficiency of such
operations, or the representation of strings and lists).

If you have an operation which does something (specifically) for a string
and an operation which does the same (analogous) thing for a list, does it
not make sense to give them the same name?

Let us take as an example a string "ABCDE" and a list (Bob, Tom, Jim, Fred,
Pete). If we have an operation called 'Head' that returns the first element
of a string ('A' in the example), do you think Ada programmers are going to
thank you for calling the same list operation (which would return Bob in the
example) something else ('First', 'Front', even 'Cat' or 'Dog')? I don't.

I can assure you that, in the big scheme of things, there is no standard
terminology for lists. There are a few terms that seem to be used
consistently, but only a few. Let us use the terminology already provided by
existing Ada standard library packages. That is, I am certain, the best way
for a container library to avoid confusion and gain acceptance.

Phew! I hope I'm 'getting my message across' as they say.

--
Best wishes,
Nick Roberts






  reply	other threads:[~2001-12-12  1:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06 20:26 ASCL a doomed idea? Michael Erdmann
2001-12-06 20:49 ` Mark Lundquist
2001-12-09 19:07   ` Nick Roberts
2001-12-09 21:37     ` Jeffrey Carter
2001-12-10 19:36       ` Nick Roberts
2001-12-10 22:37         ` Jeffrey Carter
2001-12-10 23:30           ` Chad R. Meiners
2001-12-11  1:42             ` Jeffrey Carter
2001-12-11  3:40               ` Chad R. Meiners
2001-12-11 14:45           ` Mark Lundquist
2001-12-11 15:06             ` Ted Dennison
2001-12-11 15:09               ` Jean-Marc Bourguet
2001-12-11 17:18               ` Stephen Leake
2001-12-12  4:29               ` Jeffrey Carter
2001-12-12 14:40                 ` Ted Dennison
2001-12-11 15:25             ` Larry Hazel
2001-12-12  4:21             ` Jeffrey Carter
2001-12-12 14:32               ` Stephen Leake
2001-12-12 19:40               ` Mark Lundquist
2001-12-16 13:23               ` Georg Bauhaus
2001-12-11 14:45         ` Mark Lundquist
2001-12-11 15:11           ` Ted Dennison
2001-12-11 17:43             ` Nick Roberts
2001-12-12  0:37               ` Mark Lundquist
2001-12-12  4:31           ` Jeffrey Carter
2001-12-11 22:45         ` Mark Lundquist
2001-12-12  1:39           ` Nick Roberts [this message]
2001-12-12 10:08             ` Ian Wild
2001-12-12 17:03               ` Nick Roberts
2001-12-12 22:09                 ` Brian Rogoff
2001-12-12 14:34             ` Marin David Condic
2001-12-11 14:45       ` Mark Lundquist
2001-12-12  4:32         ` Jeffrey Carter
2001-12-12 14:48           ` Ted Dennison
2001-12-12 17:02           ` Nick Roberts
replies disabled

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