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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-06-11 04:05:10 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!newsfeed.r-kom.de!feeder01.news.de.uu.net!news-1.bank.dresdner.net!not-for-mail From: James Kanze Newsgroups: comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Long names are doom ? Date: Mon, 11 Jun 2001 12:52:37 +0200 Organization: Dresdner Bank AG Message-ID: <3B24A2F5.958C1DC7@dresdner-bank.com> References: <9f8b7b$h0e$1@nh.pace.co.uk> <9f8r0i$lu3$1@nh.pace.co.uk> <9fgagu$6ae$1@nh.pace.co.uk> <9fjgha$blf$1@nh.pace.co.uk> <35mqhtkdfma2rggv1htcaq6vfn2ihs67a1@4ax.com> <9fli1b$4aa$1@nh.pace.co.uk> <3B20E1B0.3EC7FEBB@dresdner-bank.com> <7q32itc596euq7tgic3qgd4qpov9bocaj5@4ax.com> Reply-To: default@dresdner-bank.com NNTP-Posting-Host: ffzj09tz.bank.dresdner.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 4.7 [en]C-CCK-MCD drebazen10 (WinNT; I) X-Accept-Language: en,fr,de Xref: archiver1.google.com comp.lang.ada:8532 comp.lang.awk:2974 comp.lang.clarion:21624 comp.lang.java.programmer:75234 comp.lang.pl1:964 comp.lang.vrml:3705 Date: 2001-06-11T12:52:37+02:00 List-Id: Larry Kilgallen wrote: > In article <7q32itc596euq7tgic3qgd4qpov9bocaj5@4ax.com>, Pete > Thompson writes: > > On Fri, 08 Jun 2001 16:31:12 +0200, James Kanze > > wrote: > >>Pete Thompson wrote: > >> [...] > >>> Well, sure. Pointer arithmetic in C/C++ is inherently unsafe > >>> and encourages obfuscation. However, it also promotes > >>> flexibility. > >>Just curious, but what can you do with pointer arithmetic in C/C++ > >>that you couldn't do otherwise, in a cleaner fashion? > > Well... I'm not saying that there's anything that would be > > impossible to do without pointer arithmetics -- there's always > > another way to do things, after all. I'm just saying that there > > are cases where using pointer arithmetics are simply faster. I > > find it convenient for when dealing with strings/substrings, > > images, special effects, filters, masks, reading the system > > memory, etc. One might argue that arrays are an abstract form of > > pointer arithmetics. > Others would argue that arrays are a safe paradigm for doing what is > done with pointer arithmetic. Which was, of course, my point. It only holds for real arrays, though; not for the cheap imiations in C. And there are a (very) few exceptions; I find pointer arithmetic convenient when writing memory management code (malloc or a garbage collector), for example. But most applications don't have to deal with that level, and for them, broken arrays and pointer arithmetic are just a source of errors. -- James Kanze mailto:kanze@gabi-soft.de Conseils en informatique orient�e objet/ Beratung in objektorientierter Datenverarbeitung Ziegelh�ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627