comp.lang.ada
 help / color / mirror / Atom feed
* Why not using [] instead of () for array?
@ 2002-02-25  1:19 Adrian Hoe
  2002-02-25  1:48 ` Larry Kilgallen
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Adrian Hoe @ 2002-02-25  1:19 UTC (permalink / raw)


I had a possibly fruitful discussion (a long one and solely discussed
about using Ada for joint-project) with a number of possible
co-workers this weekend. When I showed them a piece of Ada source
code, one (only) question was asked by these friends and I didn't know
exactly the answer.

"Why not use [] instead of () for array in Ada?"

Two reasons for [] is preferred to ():

1. More clarity, certainly leads to more readability.

2. More distinguishable from functions parameters and leads to 1.


Example 1
=========
matrix (1 .. 100);

compares to

matrix [1 .. 100];


Example 2
=========

do_matrix (8);

a := matrix (8);

compares to

do_matrix (8);

a:= matrix [8];

where do_matrix is a procedure (or can be function) which takes an
integer parameter to refer an array. Notice the use of matrix [8]
instantly distingusihes itself from a function/procedure with
parameter(s) compares to matrix (8).

I don't know if this has been discussed before. But I think this is a
good question. What exactly the reason for using () rather than []? I
strongly believe a strong reason exists which I don't know. Anyone?

                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
@ 2002-02-25  1:48 ` Larry Kilgallen
  2002-02-25  3:14   ` Darren New
  2002-02-25 10:14   ` Peter Hermann
  2002-02-25  3:23 ` Dale Stanbrough
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Larry Kilgallen @ 2002-02-25  1:48 UTC (permalink / raw)


In article <9ff447f2.0202241719.446bf17b@posting.google.com>, byhoe@greenlime.com (Adrian Hoe) writes:

> "Why not use [] instead of () for array in Ada?"

I thought I had heard that certain keyboard limitations affected
the choice when Ada83 was being standardized.

> Two reasons for [] is preferred to ():
> 
> 1. More clarity, certainly leads to more readability.
> 
> 2. More distinguishable from functions parameters and leads to 1.

My understanding is that function parameters and array indices are
intentionally encoded with the same bracketing types to allow one
to be substituted for another in a subsequent version of a program.
A function might be more efficient for a very sparse array, even
though the logical construct is an array.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:48 ` Larry Kilgallen
@ 2002-02-25  3:14   ` Darren New
  2002-02-25 10:14   ` Peter Hermann
  1 sibling, 0 replies; 21+ messages in thread
From: Darren New @ 2002-02-25  3:14 UTC (permalink / raw)


Larry Kilgallen wrote:
> My understanding is that function parameters and array indices are
> intentionally encoded with the same bracketing types to allow one
> to be substituted for another in a subsequent version of a program.

This would seem strange to me, given how explicit people seem to want
Ada to be. Surely if "use" is in any sense "unsafe", then confusing an
array and a function would be equally ... well, confusing?

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
  To the user, everything works just as expected,
    assuming the user's expectations are correct.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
  2002-02-25  1:48 ` Larry Kilgallen
@ 2002-02-25  3:23 ` Dale Stanbrough
  2002-02-25  5:28 ` David Starner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Dale Stanbrough @ 2002-02-25  3:23 UTC (permalink / raw)


Adrian Hoe wrote:

> "Why not use [] instead of () for array in Ada?"
> 
> Two reasons for [] is preferred to ():
> 
> 1. More clarity, certainly leads to more readability.
> 
> 2. More distinguishable from functions parameters and leads to 1.


I've done a bit of Ada programming, and never really found it to be
a problem. Generally array accessing is fairly local in scope, and
you can see/know where the array declaration is.

For larger programs you tend to hide arrays behind functions/procedures
(you can pragma inline them if needs be).

In the end it's not going to lead to errors because any ambiguity 
will be picked up and flagged by the compiler.

The only real reason for () vs [] in Ada is historical.


Dale



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
  2002-02-25  1:48 ` Larry Kilgallen
  2002-02-25  3:23 ` Dale Stanbrough
@ 2002-02-25  5:28 ` David Starner
  2002-02-25 14:39   ` Robert Dewar
  2002-02-25 18:46 ` Toshitaka Kumano
  2002-02-27  1:09 ` Adrian Hoe
  4 siblings, 1 reply; 21+ messages in thread
From: David Starner @ 2002-02-25  5:28 UTC (permalink / raw)


On 24 Feb 2002 17:19:01 -0800, Adrian Hoe <byhoe@greenlime.com> wrote:
> I don't know if this has been discussed before. But I think this is a
> good question. What exactly the reason for using () rather than []? I
> strongly believe a strong reason exists which I don't know. Anyone?

[] are not in the ISO 646 safe subset - that is, there are a few systems
(and there used to be more) that either uses EBCDIC (which doesn't
include []) or use a national variant of ASCII that puts accented
characters or the like in those spots. 

-- 
David Starner - starner@okstate.edu
What we've got is a blue-light special on truth. It's the hottest thing 
with the youth. -- Information Society, "Peace and Love, Inc."



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:48 ` Larry Kilgallen
  2002-02-25  3:14   ` Darren New
@ 2002-02-25 10:14   ` Peter Hermann
  1 sibling, 0 replies; 21+ messages in thread
From: Peter Hermann @ 2002-02-25 10:14 UTC (permalink / raw)


Larry Kilgallen <Kilgallen@SpamCop.net> wrote:
> My understanding is that function parameters and array indices are
> intentionally encoded with the same bracketing types to allow one
> to be substituted for another in a subsequent version of a program.
> A function might be more efficient for a very sparse array, even
> though the logical construct is an array.

This is an extremely welcome property, indeed.
Ada again proves to tend to the practical side.

-- 
--Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de
--Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
--http://www.csv.ica.uni-stuttgart.de/homes/ph/
--Team Ada: "C'mon people let the world begin" (Paul McCartney)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  5:28 ` David Starner
@ 2002-02-25 14:39   ` Robert Dewar
  2002-02-26  7:56     ` Mats Karlssohn
  2002-02-27  0:50     ` Adrian Hoe
  0 siblings, 2 replies; 21+ messages in thread
From: Robert Dewar @ 2002-02-25 14:39 UTC (permalink / raw)


David Starner <dvdeug@x8b4e53cd.dhcp.okstate.edu> wrote in message news:<a5ci16$9281@news.cis.okstate.edu>...
> [] are not in the ISO 646 safe subset

Indeed, it was always a pain to write Pascal in Sweden,
where [] are overridden for the extra letters in the 
Swedish alphabet.

But anyone asking this question should also understand
that

a) this is a very old old language discussion item, dating
back decades, with arguments on both sides (there are those who like
the idea of using the same syntax for two different concrete ways of
representing functions - an
array is of course simply a function mathematically).

b) this has been discussed ad nauseam, and there is nothing
else to add

c) this has been discussed on CLA, and now that google has
all the old records, there is no excuse for anyone not
consuling the archives :-)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
                   ` (2 preceding siblings ...)
  2002-02-25  5:28 ` David Starner
@ 2002-02-25 18:46 ` Toshitaka Kumano
  2002-02-27  4:54   ` Robert Dewar
  2002-02-27  1:09 ` Adrian Hoe
  4 siblings, 1 reply; 21+ messages in thread
From: Toshitaka Kumano @ 2002-02-25 18:46 UTC (permalink / raw)


Adrian Hoe wrote:
> 2. More distinguishable from functions parameters and leads to 1.

Although I don't know what the true reason is, "*in*distinguishablity"
here is my favorite.

From a mathematical view, The syntax,
   Output := Mapping (Input);  
can be read "Input maps onto Input".

And the mapping can be static as arrays or dynamic as some function,
in various reason, according to circumstances.

Although I admit they are not equivalent, for in array Input cannot be
composite, the psuedo-equivalence makes me feel there is good sense in
the language design, say, conformity against modification, here.

The mapping-like-sematics of "()" is true also with type conversion,
where representation mapping is done via derivation, e.g., from
byte map to bitmap, or from "no-repped" enumeration to "repped"
enumeration, vice versa. 

In another case, the fact that a parameterless function is
indistinguishable with a variable, unlike other languages, makes me
charmed much.


And there is more "visually indistinguishable" things in the language,
probably intently, e.g. Tasks.Entry vs Package.Procedure,
Access_Object.Component vs Non-Access_Object.Component...


*Visual* indistinguishability makes little problem in the strong-typed
language, bacause compilers are so *ruthless* in their
distinguishability
:-)

-- 
Toshitaka Kumano



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25 14:39   ` Robert Dewar
@ 2002-02-26  7:56     ` Mats Karlssohn
  2002-02-27  4:52       ` Robert Dewar
  2002-02-27 14:29       ` David Starner
  2002-02-27  0:50     ` Adrian Hoe
  1 sibling, 2 replies; 21+ messages in thread
From: Mats Karlssohn @ 2002-02-26  7:56 UTC (permalink / raw)


Robert Dewar wrote:
%<
> Indeed, it was always a pain to write Pascal in Sweden,
> where [] are overridden for the extra letters in the
> Swedish alphabet.

Just for the sake of satisfying the curious, when using swedish 7-bit
characters;
the character '{' is a lover-case 'a' with umlaut (two dots over it)
the character '}' is a lover-case 'a' with a small ring over it
the character '|' is a lover-case 'o' with umlaut
the character '[' is an upper-case 'A' with umlaut
the character ']' is an upper-case 'A' with a small ring over it
and the character '\' is an uppercase 'O' with umlaut

I don't know the linguistic term for the little ring.

Do I get todays point for worthless knowledge ? ;-)

-- 
Mats Karlssohn, developer                         mailto:mats@mida.se  
Mida Systemutveckling AB                          http://www.mida.se
Box 64, S-732 22 ARBOGA, SWEDEN
Phone: +46-(0)589-89808   Fax: +46-(0)589-89809



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25 14:39   ` Robert Dewar
  2002-02-26  7:56     ` Mats Karlssohn
@ 2002-02-27  0:50     ` Adrian Hoe
  2002-02-27 17:37       ` Jeffrey Carter
  1 sibling, 1 reply; 21+ messages in thread
From: Adrian Hoe @ 2002-02-27  0:50 UTC (permalink / raw)


dewar@gnat.com (Robert Dewar) wrote in message news:<5ee5b646.0202250639.5002d518@posting.google.com>...
> David Starner <dvdeug@x8b4e53cd.dhcp.okstate.edu> wrote in message news:<a5ci16$9281@news.cis.okstate.edu>...
> > [] are not in the ISO 646 safe subset
> 
> Indeed, it was always a pain to write Pascal in Sweden,
> where [] are overridden for the extra letters in the 
> Swedish alphabet.
> 
> But anyone asking this question should also understand
> that
> 
> a) this is a very old old language discussion item, dating
> back decades, with arguments on both sides (there are those who like
> the idea of using the same syntax for two different concrete ways of
> representing functions - an
> array is of course simply a function mathematically).
> 
> b) this has been discussed ad nauseam, and there is nothing
> else to add
> 
> c) this has been discussed on CLA, and now that google has
> all the old records, there is no excuse for anyone not
> consuling the archives :-)


I could not find it in Google's archives. Any pointer? :-(

                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
                   ` (3 preceding siblings ...)
  2002-02-25 18:46 ` Toshitaka Kumano
@ 2002-02-27  1:09 ` Adrian Hoe
  4 siblings, 0 replies; 21+ messages in thread
From: Adrian Hoe @ 2002-02-27  1:09 UTC (permalink / raw)


byhoe@greenlime.com (Adrian Hoe) wrote in message news:<9ff447f2.0202241719.446bf17b@posting.google.com>...
> I had a possibly fruitful discussion (a long one and solely discussed
> about using Ada for joint-project) with a number of possible
> co-workers this weekend. When I showed them a piece of Ada source
> code, one (only) question was asked by these friends and I didn't know
> exactly the answer.
> 
> "Why not use [] instead of () for array in Ada?"
> 
> Two reasons for [] is preferred to ():
> 
> 1. More clarity, certainly leads to more readability.
> 
> 2. More distinguishable from functions parameters and leads to 1.
> 
> 
> Example 1
> =========
> matrix (1 .. 100);
> 
> compares to
> 
> matrix [1 .. 100];
> 
> 
> Example 2
> =========
> 
> do_matrix (8);
> 
> a := matrix (8);
> 
> compares to
> 
> do_matrix (8);
> 
> a:= matrix [8];
> 
> where do_matrix is a procedure (or can be function) which takes an
> integer parameter to refer an array. Notice the use of matrix [8]
> instantly distingusihes itself from a function/procedure with
> parameter(s) compares to matrix (8).
> 
> I don't know if this has been discussed before. But I think this is a
> good question. What exactly the reason for using () rather than []? I
> strongly believe a strong reason exists which I don't know. Anyone?
> 
>                               -- Adrian Hoe
>                               -- http://greenlime.com/users/adrian.hoe


Thanks for clearing things up. Your points have prepared me more to
answer questions like this.


                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-26  7:56     ` Mats Karlssohn
@ 2002-02-27  4:52       ` Robert Dewar
  2002-02-27 16:44         ` Darren New
  2002-02-27 14:29       ` David Starner
  1 sibling, 1 reply; 21+ messages in thread
From: Robert Dewar @ 2002-02-27  4:52 UTC (permalink / raw)


Mats Karlssohn <mats@mida.se> wrote in message news:<3C7B3FC1.734F9367@mida.se>...

> I don't know the linguistic term for the little ring.

I don't think there is one, A with a circle above it is
a separate letter in Swedish that is distinct from A, in
other words this is not an A with some kind of diacritical
mark. I asked a Swedish friend "what's the name for the
little circle above the A", and he thought for the moment
and said "little circle above the A" :-)

After all, you could ask "what is the linguistic term for
the dot over a lower case I", and you would get a similar
answer.

To know whether a character such as this is a separate
letter or a letter with a diacritical mark of some kind
such as an accent, you can apply Jean Ichbiah's crossword
puzzle test. For example in French you can have an E that
is accented across but not down, but you could never have
a Swedish crossword puzzle with A horizontal and A-circle
vertical.

This came up in the context of the Ada 95 design (in particular the
CRG discussion). Jean wanted e and e-acute
to be considered equivalent. That makes some sense since 
for example in French, it is in practice optional whether
to put the accent over the upper case E (formally it is
required, but the French are so use to the practice introduced by
typewriters of omitting the accent for upper
case letters, that quite a few French folks I have talked
to have insisted that the accent is not permitted -- they
are wrong as you can quickly tell from looking at any academic
publication in French :-)

See, who would have thought that the circle over an A has
a direct Ada connection :-)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-25 18:46 ` Toshitaka Kumano
@ 2002-02-27  4:54   ` Robert Dewar
  2002-02-27  8:48     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 21+ messages in thread
From: Robert Dewar @ 2002-02-27  4:54 UTC (permalink / raw)


Toshitaka Kumano <kumano@cl.cilas.net> wrote in message news:<3C7A8668.50BC257B@cl.cilas.net>...

> From a mathematical view, The syntax,
>    Output := Mapping (Input);  
> can be read "Input maps onto Input".

Kumano-san states the mathematical argument very nicely
here. Personally I tend to agree with this point of view.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-27  4:54   ` Robert Dewar
@ 2002-02-27  8:48     ` Dmitry A. Kazakov
  2002-02-28  5:29       ` Adrian Hoe
  2002-02-28 21:39       ` Florian Weimer
  0 siblings, 2 replies; 21+ messages in thread
From: Dmitry A. Kazakov @ 2002-02-27  8:48 UTC (permalink / raw)


On 26 Feb 2002 20:54:03 -0800, dewar@gnat.com (Robert Dewar) wrote:

>Toshitaka Kumano <kumano@cl.cilas.net> wrote in message news:<3C7A8668.50BC257B@cl.cilas.net>...
>
>> From a mathematical view, The syntax,
>>    Output := Mapping (Input);  
>> can be read "Input maps onto Input".
>
>Kumano-san states the mathematical argument very nicely
>here. Personally I tend to agree with this point of view.

Yes, however analogy is not complete in Ada. At least three things
spoil this nice equivalence. For arrays one can do:

1. Result assignment.  Mapping (Input) := Output

2. Index ranges. Subset := Mapping (From..To)

3. Aggregates

This by no means invalidates the argument of course. Rather opposite,
one should support access results, user-defined index types (=>ranges,
slices), user-defined aggregates ...

... and maybe user-defined []-operator (:-))

Regards,
Dmitry Kazakov



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-26  7:56     ` Mats Karlssohn
  2002-02-27  4:52       ` Robert Dewar
@ 2002-02-27 14:29       ` David Starner
  1 sibling, 0 replies; 21+ messages in thread
From: David Starner @ 2002-02-27 14:29 UTC (permalink / raw)


On Tue, 26 Feb 2002 08:56:49 +0100, Mats Karlssohn <mats@mida.se> wrote:
> I don't know the linguistic term for the little ring.

I don't know a linguistic term, but Unicode/ISO 10646 (which more or
less is the standard for character names in the computer world) calls it
simply RING ABOVE.

-- 
David Starner - starner@okstate.edu
What we've got is a blue-light special on truth. It's the hottest thing 
with the youth. -- Information Society, "Peace and Love, Inc."



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-27  4:52       ` Robert Dewar
@ 2002-02-27 16:44         ` Darren New
  0 siblings, 0 replies; 21+ messages in thread
From: Darren New @ 2002-02-27 16:44 UTC (permalink / raw)


Robert Dewar wrote:
> After all, you could ask "what is the linguistic term for
> the dot over a lower case I", 

It's called a tittle.

 -- Darren, repository of useless knowledge.

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
  To the user, everything works just as expected,
    assuming the user's expectations are correct.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-27  0:50     ` Adrian Hoe
@ 2002-02-27 17:37       ` Jeffrey Carter
  0 siblings, 0 replies; 21+ messages in thread
From: Jeffrey Carter @ 2002-02-27 17:37 UTC (permalink / raw)


Adrian Hoe wrote:
> 
> > c) this has been discussed on CLA, and now that google has
> > all the old records, there is no excuse for anyone not
> > consuling the archives :-)
> 
> I could not find it in Google's archives. Any pointer? :-(

I quickly found a thread titled

computer trivia (was Re: ;;ANY Free ADA Compiler on Windows 95)

from 1998. Included in the thread is a message from Robert Dewar
(whoever he is) giving the right answer that the requirements for DOD-1
[later called Ada, now called Ada 80 (MIL-STD 1815, 1980 Dec 10)]
excluded the use of brackets.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-27  8:48     ` Dmitry A. Kazakov
@ 2002-02-28  5:29       ` Adrian Hoe
  2002-02-28 21:39       ` Florian Weimer
  1 sibling, 0 replies; 21+ messages in thread
From: Adrian Hoe @ 2002-02-28  5:29 UTC (permalink / raw)


dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) wrote in message news:<3c7c9767.727156@News.CIS.DFN.DE>...
> On 26 Feb 2002 20:54:03 -0800, dewar@gnat.com (Robert Dewar) wrote:
> 
> >Toshitaka Kumano <kumano@cl.cilas.net> wrote in message news:<3C7A8668.50BC257B@cl.cilas.net>...
> >
> >> From a mathematical view, The syntax,
> >>    Output := Mapping (Input);  
> >> can be read "Input maps onto Input".
> >
> >Kumano-san states the mathematical argument very nicely
> >here. Personally I tend to agree with this point of view.
> 
> Yes, however analogy is not complete in Ada. At least three things
> spoil this nice equivalence. For arrays one can do:
> 
> 1. Result assignment.  Mapping (Input) := Output
> 
> 2. Index ranges. Subset := Mapping (From..To)
> 
> 3. Aggregates
> 
> This by no means invalidates the argument of course. Rather opposite,
> one should support access results, user-defined index types (=>ranges,
> slices), user-defined aggregates ...
> 
> ... and maybe user-defined []-operator (:-))
> 
> Regards,
> Dmitry Kazakov


Kumano-san mathematical arguments are agreeable (at least with me:).
And Kazakov's user-defined []-operator (proposed?) seems acceptable
since Pascal provides alternative digraphs (. for [     :)

At least, I get to know of this ASCII problem with programming
languages.

Anyway, I am comfortable with () and I will know to handle this
question if ever comes to me again. :)

                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
@ 2002-02-28  6:37 Christoph Grein
  2002-02-28 22:56 ` Jeffrey Carter
  0 siblings, 1 reply; 21+ messages in thread
From: Christoph Grein @ 2002-02-28  6:37 UTC (permalink / raw)


From: Jeffrey Carter <jeffrey.carter@boeing.com>
> ... Robert Dewar
> (whoever he is) ...

Is this a joke? You do not know Robert??? Everyone knows Robert for his famous: 
"This is obvious, I do not see how you could think otherwise..." :-)



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-27  8:48     ` Dmitry A. Kazakov
  2002-02-28  5:29       ` Adrian Hoe
@ 2002-02-28 21:39       ` Florian Weimer
  1 sibling, 0 replies; 21+ messages in thread
From: Florian Weimer @ 2002-02-28 21:39 UTC (permalink / raw)


dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) writes:

>>Kumano-san states the mathematical argument very nicely
>>here. Personally I tend to agree with this point of view.
>
> Yes, however analogy is not complete in Ada. At least three things
> spoil this nice equivalence. For arrays one can do:
>
> 1. Result assignment.  Mapping (Input) := Output

This notation is not completely unusual in mathematical circles
nowadays, even among mathematicians who haven't been influenced much
by programming languages.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Why not using [] instead of () for array?
  2002-02-28  6:37 Christoph Grein
@ 2002-02-28 22:56 ` Jeffrey Carter
  0 siblings, 0 replies; 21+ messages in thread
From: Jeffrey Carter @ 2002-02-28 22:56 UTC (permalink / raw)


Christoph Grein wrote:
> 
> From: Jeffrey Carter <jeffrey.carter@boeing.com>
> > ... Robert Dewar
> > (whoever he is) ...
> 
> Is this a joke? You do not know Robert??? Everyone knows Robert for his famous:
> "This is obvious, I do not see how you could think otherwise..." :-)

Of course it's a joke. That's obvious; I don't see how you could think
otherwise.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-02-28 22:56 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-25  1:19 Why not using [] instead of () for array? Adrian Hoe
2002-02-25  1:48 ` Larry Kilgallen
2002-02-25  3:14   ` Darren New
2002-02-25 10:14   ` Peter Hermann
2002-02-25  3:23 ` Dale Stanbrough
2002-02-25  5:28 ` David Starner
2002-02-25 14:39   ` Robert Dewar
2002-02-26  7:56     ` Mats Karlssohn
2002-02-27  4:52       ` Robert Dewar
2002-02-27 16:44         ` Darren New
2002-02-27 14:29       ` David Starner
2002-02-27  0:50     ` Adrian Hoe
2002-02-27 17:37       ` Jeffrey Carter
2002-02-25 18:46 ` Toshitaka Kumano
2002-02-27  4:54   ` Robert Dewar
2002-02-27  8:48     ` Dmitry A. Kazakov
2002-02-28  5:29       ` Adrian Hoe
2002-02-28 21:39       ` Florian Weimer
2002-02-27  1:09 ` Adrian Hoe
  -- strict thread matches above, loose matches on Subject: below --
2002-02-28  6:37 Christoph Grein
2002-02-28 22:56 ` Jeffrey Carter

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