Article View: comp.lang.misc
Article #959How is C powerful? (Re: Relationship between C and C++)
From: Peter da Silva
Date: Thu, 22 Mar 1990 23:27
Date: Thu, 22 Mar 1990 23:27
50 lines
3073 bytes
3073 bytes
In article <2977@castle.ed.ac.uk> nick@lfcs.ed.ac.uk (Nick Rothwell) writes:
> In article <D_D27L1xds13@ficc.uu.net>, peter@ficc (Peter da Silva) writes:
> >There are only two languages I know of in which you can take a moderately
> >complex program and run it, without modification, on a wide variety of
> >platforms.
> But, this leaves two issues open: (i) why C has such an idiotic
> syntax, arbitrary type-checking, lax compile-time checks and so on,
> and (ii) why people think that C's features provide "power" in
> general-purpose programming. Point (i) is an accident of history.
> Point (ii) still intrigues me.
Well, the C syntax is generally pretty nice. It's got a couple of minor
boners and one major one (making the shorthand for [0] (i.e. *) a prefix
rather than a postfix operator), but all in all it's a pretty language in
an art-deco sort of way.
As for the latter, well, people find that C provides them with a very
broad and powerful base to work from. Other languages that provide similar
degrees of power aren't widely enough available, or when they are they're
found in too many dialects to be considered a single language.
UCSD Pascal, for example, is a useful language. So is Oregon Pascal, and
Turbo Pascal. Unfortunately, ISO Pascal hasn't been adequate, so UCSD and
Oregon and Turbo and other Pascals aren't compatible with each other.
The same holds true, to a lesser degree, for Modula-2.
Back to the point... people find a language that does the job, with really
no alternative, and they attribute its success to the obvious places where
it differs from other, similar, languages. rather than the somewhat subtle
issue of the breadth of the standard...
> I find that C's adherence to an implementation-defined word size limits
> portability anyway; but I don't think that's an avoidable problem.
In practice word size is always going to be implementation defined. The
biggest problem with C word size is the implicit pointer-integer aliasing
in function calls. I expect ANSI function prototyping will fix that. I
would hope that ANSI compiler vendors will provide an option whereby it
is considered an error to call a routine with no prototype in socpe.
> And we mourn its passing. Full PASCAL and screen editor in 56K.
Let's not get started on "small is beautiful".
--
_--_|\ `-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
/ \ 'U`
\_.--._/
v
Technical Details
Message-ID:
<0=E20EExds13@ficc.uu.net>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peterReferences:
<EGB2327xds13@ficc.uu.net> <8432@hubcap.clemson.edu> <6515@eos.UUCP> <2944@castle.ed.ac.uk> <D_D27L1xds13@ficc.uu.net> <2977@castle.ed.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.misc Subject: How is C powerful? (Re: Relationship between C and C++) Message-ID: <0=E20EExds13@ficc.uu.net> Date: 22 Mar 90 23:27:05 GMT References: <EGB2327xds13@ficc.uu.net> <8432@hubcap.clemson.edu> <6515@eos.UUCP> <2944@castle.ed.ac.uk> <D_D27L1xds13@ficc.uu.net> <2977@castle.ed.ac.uk> Reply-To: peter@ficc.uu.net (Peter da Silva) Organization: Xenix Support, FICC Lines: 45