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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: kdq@emoryi.jpl.nasa.gov (Kevin D. Quitt) Subject: Re: Ada is 'better' than C because... Date: 1996/08/09 Message-ID: <320ba488.9726906@netline-fddi.jpl.nasa.gov>#1/1 X-Deja-AN: 173203634 references: <01bb7bf9$b89a1740$96ee6fcf@timhome2> <4tj43k$16r@newsbf02.news.aol.com> <3205F296.41C6@wgs.estec.esa.nl> <320a638d.534305610@netline-fddi.jpl.nasa.gov> content-type: text/plain; charset=US-ASCII organization: Speaking only for Myself mime-version: 1.0 reply-to: kdq@emoryi.jpl.nasa.gov newsgroups: comp.lang.ada,comp.lang.c Date: 1996-08-09T00:00:00+00:00 List-Id: On 08 Aug 1996 16:46:39 -0600, clodius@hotspec.lanl.gov (William Clodius) wrote: > >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. Only notationally. All the languages have to go through similar "pointer arithmetic" to calculate array offsets. In fact, with C's array-of-pointers- as-a-two-dimensional-array, it does *less* pointer arithmetic. >Second, while (almost?) all >languages that have arrays have indexing, a number of languages, have >additional capabilities that C arrays lack, Without a doubt. But this has nothing to do with eliminating arrays (only) in C if pointer arithmetic is not allowed. -- #include _ Kevin D Quitt USA 91351-4454 96.37% of all statistics are made up Per the FCA, this email address may not be added to any commercial mail list