Nick Maclaren wrote:
> It is possible to build an abstraction on top of that which includes
> both the pointer and its size, but that is a separate model. Many
> of the more robust C programs do precisely that -
Yes, this point was made long ago and even in a previous
thread. Obviously the programmer needs to keep track of
the buffer size one way or another, and that can be done
ad hoc or in a more organized manner, such as forming an
abstract "buffer" data type that embeds the length. C
is sufficiently "low level" that it quite properly does
not impose a particular approach upon the programmer,
whose needs might not align well with those of some
other programmer or project. Thus, the responsibility
for making intelligent and appropriate choices rests on
the programmer. Learning to do a good job of that is
part of learning to be a good systems programmer.
Received on Thu Sep 29 21:43:15 2005