Portability and long long

uunet!phoenix.cambridge.ac.uk!NMM1 uunet!phoenix.cambridge.ac.uk!NMM1
Sun Dec 15 04:57:28 PST 1991


I sent this to David Hough instead of the NCEG - I will now try again!

All of the points that David Hough makes on 64-bit integer types are
plausible, and some of them are important, but I take PRECISELY the
opposite stand!

Just because many C programmers produce horrible programs (all right,
squire, I admit that I do too!) is no justication for forcing everyone else
to use their style.  If there is a choice, standards should choose the
cleaner and more forward-looking of two alternatives.

In SHARE Europe (IBM user group), we have discussed this very point, and
almost unanimously said that we wanted proper 64-bit integers for use with
64-bit pointers.  We were all experienced application programmers, support
staff and so on.  At the time, IBM was shipping products with 32-bit
integers and 48-bit pointers - the latest version of VS Fortran does the
job properly (both are 64-bit, as the ordinary programmer sees them).

One of the problems with C is that 'int' and 'long' are bound so deeply
into the language.  For example, making 'size_t' potentially longer than
'long' makes it impossible to write out a value of type 'size_t' in a
portable program!  I cannot see ANY solution to this.

No, no, PLEASE let us have 'long' big enough to be at least the length
of the longest data object that can be allocated.

Nick Maclaren
University of Cambridge Computing Service
nmm1aphx.cam.ac.uk



More information about the Numeric-interest mailing list