Related articles |
---|
Which target language do I choose? Thomas.Mork.Farrelly@nho.hydro.com (Thomas Mork Farrelly) (1998-07-10) |
Re: Which target language do I choose? henry@spsystems.net (1998-07-13) |
Re: Which target language do I choose? wclodius@aol.com (1998-07-17) |
Re: Which target language do I choose? andrew@openkast.com (Andrew Cruickshank) (1998-07-17) |
Re: Which target language do I choose? toon@moene.indiv.nluug.nl (Toon Moene) (1998-07-20) |
Re: Which target language do I choose? conway@cs.mu.OZ.AU (1998-07-20) |
Re: Which target language do I choose? albaugh@agames.com (1998-07-20) |
Re: Which target language do I choose? mark@msm.cam.ac.uk (1998-07-24) |
[3 later articles] |
From: | henry@spsystems.net (Henry Spencer) |
Newsgroups: | comp.compilers |
Date: | 13 Jul 1998 23:40:16 -0400 |
Organization: | SP Systems, Toronto, Canada |
References: | 98-07-094 |
Keywords: | design, C |
Thomas Mork Farrelly <Thomas.Mork.Farrelly@nho.hydro.com> wrote:
> ...Portable to many platforms.
>
>[I doubt you'll find anything else that meets those criteria as well
>as C does. -John]
Indeed, I'd say that last criterion -- portability -- cuts the search
space down so dramatically that we can easily rule out most of C's
competitors. The number of languages which are really widely
implemented, so you can reasonably expect to find them on many
platforms, is quite small. In fact, you can count them on the fingers
of one hand.
BASIC loses immediately because of shortage of primitives and the fact
that many of its implementations are interpretive. (BASIC compilers
are far from unknown but are much less common.) It also suffers badly
from having each implementor designing his own extended dialect.
FORTRAN is a bit less obviously a loss, since it's invariably compiled
and many of the compilers are good ones. However, it is a relatively
impoverished language (remember, most implementations are FORTRAN 77
at best -- Fortran 90 is too rare to be relevant here), especially in
the area of data structures. It also tends to be found mostly on the
larger systems, since its emphasis is on floating-point computation,
and that may be a handicap if you're interested in portability to
quite small machines. (There are C compilers for many machines that
are too small to have floating-point hardware, but not FORTRAN
compilers.)
Pascal might be a serious contender, but it's somewhat less common
than the other possible candidates, the compilers are often mediocre,
and the language is somewhat limited here and there. It has often
been extended to get around them, but then the Death Of A Thousand
Dialects problem appears.
There's C, and its bloated and ugly child, C++. I lump them in one
category because most C compilers these days are really C++ compilers
with the extra features mostly ignored. Exists on almost everything
-- there are C compilers for the sort of chip you would use to run a
keyboard or a toaster, and on the other extreme, for all the big
machines without exception (including some you'd never think could
support it -- some of the more obscure weasel-wording in ANSI C is
there because of the strange limitations found on machines like the
IBM System 38). Compilers usually okay and often very good. Powerful
language with good access to low-level hardware features. Fairly
standard (partly because it's powerful enough to considerably reduce
the temptation to extend it). One non-obvious advantage is that many
compilers compile to C already, which means that many C compilers have
been toughened up to cope with the peculiarities of machine-generated
code (which will often break compilers tested only on human-written
code).
And that's about it. There really isn't anything else suitable.
--
| Henry Spencer henry@spsystems.net
| (aka henry@zoo.toronto.edu)
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.