[comp.lang.misc] Pointers and poor implementations

jlg@lambda.UUCP (Jim Giles) (04/09/90)

From article <TZR2HG4xds13@ficc.uu.net>, by peter@ficc.uu.net (Peter da Silva):
> One of the reasons C is so popular is that (like Pascal) it's designed to be
> easy to implement on a wide class of machines (basically, non-segmented
> byte-addressible machines) which happen to be very common (for example, any
> personal computer you can name). This "pandering to poor implementors" is
> one of it's strengths... not one of it's weaknesses.

Non-segmented byte-addressible machine don't exhibit the failing that you
give as the reason for limiting pointer values to only lie within the
allocated object!  Apparently, you are willing to reinterpret the context
of this discussion to fit your preconceptions any time you feel like it.

So, the 'poor implementations' I referred to were any that would require
allocating more memory than the object requires in order to allow the pointer
to be set to those addresses.  You imply that many implementations actually
allocate an extra element at the end for the 'dispensation' on pointer
values at one past the end.  Are you saying that this implementation
should be regarded as anything but poor?

By the way, pascal doesn't _have_ pointer arithmetic.  So this whole issue
doesn't arise there.

J. Giles