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,2078dddcdcd8d83 X-Google-Attributes: gid103376,public From: David L Brown Subject: Re: Warning: Religious naming convention discussion :-) [was: assign help!!] Date: 1997/05/13 Message-ID: #1/1 X-Deja-AN: 241289082 Sender: dbrown@ted.vigra.com References: <5kjvcv$evt@news.cis.nctu.edu.tw> Organization: VisiCom Laboratories, Inc. Newsgroups: comp.lang.ada Date: 1997-05-13T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > Bob Duff said > < because they might be confused with C arrays, which are a very low-level > notion indeed! ;-) (And, by the way, I have no objection to a language>> > Why are C arrays very low-level notions? > I agree they are often used this way, but I don't see this from the standard. Probably because the notation in C: foo[bar] is semantically equivalent to *(foo + bar) Since addition is commutative, array_name[42] is the same as 42[array_name]. The array notation is just shorthand for pointer arithmetic. Fortunately, you don't have to use it this way. Dave Brown