From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: clodius@hotspec.lanl.gov (William Clodius) Subject: Re: Ada is 'better' than C because... Date: 1996/08/08 Message-ID: #1/1 X-Deja-AN: 173080245 sender: clodius@hotspec.lanl.gov references: <01bb7bf9$b89a1740$96ee6fcf@timhome2> organization: Los Alamos National Laboratory newsgroups: comp.lang.ada,comp.lang.c Date: 1996-08-08T00:00:00+00:00 List-Id: In article <320a638d.534305610@netline-fddi.jpl.nasa.gov> kdq@emoryi.jpl.nasa.gov (Kevin D. Quitt) writes: On 8 Aug 1996 00:22:01 -0400, dewar@cs.nyu.edu (Robert Dewar) wrote: >Sandy said > >"Since when was pointer arithmetic "essential"? It is simply convenient." > >Avoiding pointer arithmetic in C is pretty restrictive, it means not >using arrays at all (remember that in C the notation a[b] is simply >a shorthand for pointer arithmetic). That's a meaningful argument. Based on this, all lanaguages have pointer arithmetic, and it ain't so. Not quite. First when passed as an argument to a user defined function a C array looses a lot of its distinction from a pointer, a problem that many other languages do not have. Second, while (almost?) all languages that have arrays have indexing, a number of languages, have additional capabilities that C arrays lack, the ability to specify array shape in arguments (Fortran I), and various forms of whole array operations, APL, PL/I, Algol 68, and Fortran 90. -- William B. Clodius Phone: (505)-665-9370 Los Alamos National Laboratory Email: wclodius@lanl.gov Los Alamos, NM 87545