From -8687792609584843880
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,f5cbd811817fe301
X-Google-Attributes: gidf78e5,public
From: David Chase <chase@world.std.com>
Subject: Re: `long long' (was: Re: Where next for Standard C++?)
Date: 1997/10/28
Message-ID: <3454DAF1.5F4B@world.std.com>#1/1
X-Deja-AN: 285480109
References: <3447ABB6.1C33@pratique.fr> <62oc8e$jd$1@shade.twinsun.com> <1997Oct24.113038.16972@leeds.ac.uk> <slrn657egu.4jd.john@elixir.interlog.com>
X-Original-Date: Mon, 27 Oct 1997 13:18:25 -0500
Reply-To: chase@world.std.com
Organization: Natural Bridge LLC
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANFWQnuEDnX0m9pzZAQGo3gF9Hf9cSnixEp0f2dxNxNuydw8N96uotpvs /EtJvbKHU2uZVgwYGcMqk0HTz8M2l9Hv =K8xq
Newsgroups: comp.std.c++


John R MacMillan wrote:
> 
> |Also, contrary to other posts on the subject, there seems to
> |be no breaking of strict conformance either.
> 
> What about the following (admittedly contrived) program, which I
> believe is strictly conforming C89 and should return EXIT_SUCCESS on
> all conforming C89 implementations:

I have a hard time getting too excited about this (been programming
in Java since January, and used "long long" in C for years), but
if I recall from my C compiler and C debugging environment days,
strictly conforming programs are few and far between.  Why do
people think that arguments based on damage to strictly
conforming C programs are compelling, given that there are
so few of them?  A cynic might say that only a sucker would
write a strictly conforming ISO C program, and why do we want
suckers telling us how to design a language?

Or, to put it in other terms, there seems to be a little set
of "portability rituals" that people programming in C or C++
must learn in order to achieve either de facto portability,
or letter-of-the-standard (strict compliance) portability.
Every language has some quirks, and funny idioms and rituals
derived from these quirks, but C has more than the other languages
I know well, and I don't think this is a good thing (*).  People
who have mastered the techniques of portable programming in C
may feel proud of their acquired skills, but was this really
time well spent?  Wouldn't it better to "fix" the language so
it does not require such skill to do something that ought to
be easy?

(*) any argument based on an inability to distinguish small
non-zero numbers from arbitrarily large numbers is uninteresting.
My children know the difference between one spoonful of spinach
and ten, but a small non-zero number of people posting to the
net apparently do not.

I think it would be a good thing in any future standard if it were
a little bit easier to write a strictly-conforming program, so that
there would be more of them.  This means that well-defined integer
types need to exist, and there need to be well-defined division
and remainder operations, and signed and unsigned integers should
have well-defined conversion and casting operations (for example,
when casting an integer x of type __intXX to an unsigned of
type __uintXX, if x is less than zero, the unsigned result is
numerically equal to "2-to-the-XX plus x").

-- 
David Chase, chase@world.std.com
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]



