Erik Naggum writes [amongst other things]:
> part of the problem with pointers is that languages such as C and C++ force
> you to remember the difference between a pointer and a pointed-to-value,
> even though the language is supposedly strongly typed and the compiler
> perfectly well knows when you get it wrong. e.g., if you declare struct
> foo *bar;, it should not be a terribly hard task for the compiler to
> understand that bar.zot means the field "zot" of the structure _pointed_to_
> by bar, but oddly enough, you have to write bar->zot or (*bar).zot to do
> that, which is just idiotic. [...]
bar->zot is a shorthand for a troubling indirection operator that ritchie
regards as an accident of syntax. it also goes to show that consequences
of early mistakes can be indistinguishable from something idiotic to
anyone who sees them in a vacuum.
see "The Development of the C Language" included the "History
of Programming Languages."
send your language fixes to C9X...
oz
|