Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: When is a cast not a cast? Message-ID: <2920@buengc.BU.EDU> Date: 19 May 89 19:10:21 GMT References: <2747@buengc.BU.EDU> <10191@smoke.BRL.MIL> <406@skye.ed.ac.uk> <10276@smoke.BRL.MIL> <2890@buengc.BU.EDU> <2052@unisoft.UUCP> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.lang.c Organization: Boston Univ. Col. of Eng. Lines: 120 In article <2052@unisoft.UUCP> hamish@unisoft.UUCP (Hamish Reid) writes: >I can't stand it any longer... Take a vacation... > >Let's try this just one more time (but see also my other posting >answering Blair's more general points): ^^^^^^^^^ And chickens have lips like Barbara Hershey... >Blair - what is the type of the result of subtracting one pointer > from another? What color are they? Is it significant? Will it overflow? > [Hint: it's not an address unless you cast it that way - and > then it wouldn't in general be a meaningful address] Never said I'd dereference it. > - what is the *difference* between two pointers (a la > subtraction)? What is the difference between two vectors (think umpty-dimensional, not those wimpy, little 3-d spatial things; include dimensions like flavor, color, opinion...what? Your semantics inadequate?) > [Hint: it's not an address unless you cast it that way - and > then it wouldn't be a meaningful address] Never said I'd dereference it, without operating to return the calculation to the land of the memory locations (as so many want it bound...) How many apples is -3 apples? What can you do with them? How much cinnamon does it take to convince the kids they're getting dessert in this situation? > - what is the type of "t" above? curly with a crossbar, for all it's worth, Mr. Reid. > [Hint: As the original poster (Tobin?) pointed out, it's not a > char *, nor is it really well-defined).] Original poster? T'was me. All I did was *(pointer + (sametype *) integer) and discovered something I'd never noticed before. That was two weeks ago. You're just coming in the middle. Mind you don't get banana cream pie all over the back of your head. This ain't clean, but it ain't dangerous, neither... As I recall, Mr. Tobin described a hypothetical 3-bit machine to argue _against_ my position, then you claimed (see your other, more pedantic posting) that I was describing hypothetical implementations in order to _support_ my position... Needless to say, I laughed out loud. He was wrong, and so were you. I'm not looking at implementation, and I've described some lunatic ones to prove that using an implementation for support of an argument is fallacious, specious, and ingermane. Pointers are to ignore such things. If I had the bucks, I'd build a memory that resided on eleven different campuses, and store all my strings of eleven chars or more in eleven different states, possibly three or four countries, one char per university. Doesn't mean I still wouldn't want the compiler to know _how_ to handle char *bar; char *foo="elevenchars"; bar = &4[foo] + &foo[6]; bar -= &foo; fprintf(stdcontinent,"%c\n",*bar); and print s on the output file/device/metaphysicalconstruct. >>>[Doug Gwynn:] Other postings have explained why we don't think a reasonable, >>>consistent model for this feature is possible. >> >>"Why we don't think...possible"?? Not only is it possible, it's sensible. >>As to whether we think it is so, that is irrelevant. > >You might want to ponder who the "we" is above. Doug Gwynn and the rest >of the Ansi C standards commitee? In this case, I doubt it got to them. I think Doug means the two or three people on the "con" side of this argument so far. >Concerned Citizens for C Programming Semantics (:-))? CCCPS? You gotta minute? Are you now or have you ever been a member of a subversive pen-pal organization? :-) >But gee, Blair Houghton (the original Man >With The Pointer Scaling Problem) says it's possible, it's sensible, so >it *must* be so. QED. RIP. Etc. R.E.S.P.E.C.T.--that's what your love means to me... ('Retha used to help me with my Fortran problems...:-) >>We don't think >>fusion is possible, either, unless we consider that it's going on all >>over the place (well, not _all_ over the place, but in all those jillions >>of stars...!) > >Speak for yourself. That was the Royal "we", I presume? There's little >else that would account for the imperiously ignorant tone of your >posting... Speak for yourself. I happen to think two pointers can be added. I also think fusion is possible, and that Cap'n Crunch does NOT stay crunchy when you add the milk. --Blair "And I don't think adding crunchberries will improve the neutron count any, either..."