Another silly question

T. William Wells bill at twwells.uucp
Sat Apr 29 03:49:06 AEST 1989


In article <1266 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
: Now suppose I am doing some serious array operations, and I have to know
: whether one array buffer is longer than another.  The elements are of type
: long.  Do I have to do this multiplying and dividing by 4 all the time?
: Another example of "user-friendly" which turns out to be "user-inimical."

Oh bullshit, Mr. Rubin. As usual, you are wanting PL/I++++, not C. And
a compiler that reads programmer's minds. If you really don't want to
do the division, maintain integer indexes, not pointers.

If you think that pointer manipulation is going to give you the
better code, use them. If you think that index manipulation is going
to give you the better code, use those. And if you can't figure which
is better, how, pray tell, do you figure the compiler will figure it
out? C at least gives yo a fighting chance by giving you a choice.

---
Bill                            { uunet | novavax } !twwells!bill



More information about the Comp.lang.c mailing list