Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!purdue!gatech!mcdchg!clyde!feg From: feg@clyde.ATT.COM (Forrest Gehrke) Newsgroups: comp.lang.c Subject: Re: When it is amoral... (Re: When is a cast not a cast?) Message-ID: <45801@clyde.ATT.COM> Date: 4 May 89 19:19:48 GMT References: <2747@buengc.BU.EDU> <2763@buengc.BU.EDU> Organization: AT&T Bell Labs, Whippany NJ Lines: 30 In article <2763@buengc.BU.EDU>, bph@buengc.BU.EDU (Blair P. Houghton) writes: > > The way pointers work implies that they don't refer at all to > anything physical, even to memory locations. > On some systems, particularly one that does not deal in virtual memory, a pointer can be referring to a real memory location. Which leads me to wonder what you would do, as you insist upon being able to do, with the sum of two pointers? If you can find a use for this, why stop there? There's also multiplication and division...... > It doesn't change the fact that I'd like to be able to add and subtract ^^^ > pointers regardless of what trouble I _might_ get into. Considering the > general level of danger incurred by programming in something so potentially > obfuscatory as C, it's a small barrier to remove. The arguments of > "why would you want to do _that_?" don't hold water. I counter with > "Why would you want variadic functions?" and "Why would you want to > define mathematical routines when you can write your own in assembler > and link to them?" Perhaps this question is asked because while we can think of uses for wanting these things, we haven't thought of what we could do with the sum of pointers. You haven't yet provided any motives either. Forrest Gehrke