comp.lang.ada
 help / color / mirror / Atom feed
From: kassover@control.crd.ge.com (David Kassover)
Subject: Re: if UNIX then USE_C ?? (was: Reasons for drop)
Date: 1 Mar 90 00:29:17 GMT	[thread overview]
Message-ID: <5638@crdgw1.crd.ge.com> (raw)
In-Reply-To: 184@trwacs.UUCP

In article <184@trwacs.UUCP> epstein@trwacs.UUCP (Jeremy Epstein) writes:
>[I promised myself I wouldn't join this grudge match, but...]
>
>In article <5563@crdgw1.crd.ge.com>, kassover@jupiter.crd.ge.com (David Kassover) writes:
>> In article <204@puma.ge.com> jnixon@andrew.ATL.GE.COM (John F Nixon) writes:
>> Or even worse, I think, is the use of {} for many different kinds
>> of block statements.  In Ada I end a loop with end loop;  I end
>> an if with end if;
>
>While that's certainly true, look at how Ada overloads symbols.  For
>example, parentheses are used for parameters as well as subscripts

Sigh.  I promised myself I would stop.  Oh, well.
 

C is the first language  (no, wait a minute, I've repressed
Basic.  I think.  I can't remember...) I encountered that used [
] for subscripts.  Not to mention a doubly dimensioned array
using the notation [][]  (which *really* screwed me up once,
because the comma is an operator and the syntax x [a,b] is
perfectly legal, even when x is declared [i] [j])  In ada,
pointers are pointers and arrays are arrays, and never the twain
will share syntax.
 
In Fortran, there is really very little to distinguish a function
call from an array reference.  In fact, I submit that from the
standpoint of examining a program that contains a statement such
as
 
 	A = F (i,j,k)
 
it really doesn't matter whether a simple memory transfer or a
complex subprogram execution is called for.  What can screw you
up here is a "SIDE EFFECT", which Ada flatly refuses to allow.
(Has anyone out there *never* done something like:
 
	A = F(1)

where F was a function that caused a side effect that changed
*all* literal 1's to 3.14159265's (or whatever integer those bits
happened to represent?  What, not never?)
 
And while we're on the subject of side effects, the C treatment
of assignment as a function that returns a value, with the side
effect of making the assignment has balled me up more than once.
Especially when I tried to get too cute with fancy one-line
wonder macros that expanded in grand and glorious unanticipated ways...
 
 
Jeremy also mentions that in Ada the word end is used as a
closure for begin, and also as a closure for loop, and also as a
closure for if...
 
End all by itself ends begin.  End loop ends a loop, and if you
try to make it end an if, the compiler will complain.  If you
want to end an if, you must use end if;  If you want to end a
named loop, you must use an end loop AND reference the name of
the named loop.  End all by itself, without a matching begin,
will cause a complaint from the compiler.  This is a lot
different from } ending the last unmatched {.

  parent reply	other threads:[~1990-03-01  0:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-02-20 16:13 Reasons for dropping Ada Ted Holden
1990-02-20 21:04 ` Richard S D'Ippolito
1990-02-20 23:03   ` Reasons for keeping Ada David Kassover
1990-02-21  0:40     ` Clement Pellerin
1990-02-21 19:02   ` Reasons for dropping Ada Loren Louis Hart
1990-02-22 16:07     ` Mike Coffin
1990-02-22 17:01       ` if UNIX then USE_C ?? (was: Reasons for drop) Dennis M. O'Connor
1990-02-22 21:51         ` Barry Margolin
1990-02-23 19:34           ` Loren Louis Hart
1990-02-25 19:58           ` David Kassover
1990-02-26 12:45             ` John F Nixon
1990-02-26 18:28               ` David Kassover
1990-02-26 20:55                 ` John F Nixon
1990-02-26 22:00                   ` David Kassover
1990-02-27 18:55                 ` Jeremy Epstein
1990-02-28  1:19                   ` Alex Blakemore
1990-02-28 18:56                     ` Ada functions versus arrays (i.e. () vs [] ) Richard A Hammond
1990-03-01  3:25                       ` Alex Blakemore
1990-03-01 13:11                         ` Robert Firth
1990-03-02 10:56                           ` Mike Harrison
1990-03-02 23:46                           ` Scott Simpson
1990-03-02 10:42                         ` Mike Harrison
1990-03-06 19:13                       ` Erland Sommarskog
1990-03-08 14:21                         ` John Goodenough
1990-03-14 18:19                     ` if UNIX then USE_C ?? (was: Reasons for drop) RCAPENER
1990-03-01  0:29                   ` David Kassover [this message]
1990-03-01 15:11                     ` Steve Tynor
1990-03-01 18:29                       ` David Kassover
1990-03-02  0:19                 ` Robert D. Houk
1990-02-28 19:51         ` Andy DeFaria
1990-02-20 22:21 ` Reasons for dropping Ada Jeffrey M. Schweiger
replies disabled

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