Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: When it is amoral... (Re: When is a cast not a cast?) Message-ID: <4102@ficc.uu.net> Date: 8 May 89 12:42:22 GMT References: <2765@buengc.BU.EDU> <563@lzaz.ATT.COM> <4093@ficc.uu.net> <925@garcon.cso.uiuc.edu> Organization: Xenix Support Lines: 23 In article <925@garcon.cso.uiuc.edu>, mcdaniel@uicsrd.csrd.uiuc.edu (Tim McDaniel) writes: > Suppose that pointer addition means that "&A[i] + &A[j] == &A[i+j]". > (Is this what you had in mind, Peter?) No, I had in mind ((ptrdiff_t)&A[i]) - ((ptrdiff_t)&A[j]). It's an intermediate result only. Which you point out in great detail. > Peter, you can't just say "let there be pointer addition", and > FIAT LUX! > there is pointer addition, and it is good. You have to propose an > actual implementation. Furthermore, if this implementation is more > costly than the current situation, you have to show that the gains > outweigh the costs. You have done neither. Chill out, dude :->. I was arguing *against* it as a general operation. I was just noting that there *is* (despite my previous beliefs) an application for it. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180. Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.