From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Final kick at the "Merced Guessing Game"
Date: 1997/10/08 [thread overview]
Message-ID: <61f6pl$o1h$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 61eq73$7la@usenet.srv.cis.pitt.edu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5338 bytes --]
geest3+@pitt.edu (Gregg E Economou) writes:
>I strongly suspect you dont know what C is like. Go read K&R.
I have been using C since the days when UNIX V6+ was the latest thing.
I've fixed bugs in two C compilers.
I've bought and read three copies of the C standard (they keep disappearing
from my office; I'm getting sick of it),
and have obtained and read every publically available document about C9x.
(I was writing a proposal to add offset types to C, but didn't get it
finished in time to submit it to the committee. Sigh. It'd sure make
putting linked structures in shared memory easier.)
>>Modules? Fortran has them, C hasn't.
>C is very simple, and designed such that you can implement things of
>a higher nature with it if you wish. You can write code that
>behaves in a particular style in C.
If you think C is simple, you probably haven't seen the insides of a
C compiler. And you are going to have a nasty shock when C9X comes out.
>You're confusing issues of the library with the language.
>That migth be fine in an HLL like Fortran but in C the library
>is not part of the language, even if it is standardized and commonly
>accepted.
Clearly you have never participated in any of the threads about this
in comp.std.c. The C `library' *is* an official part of the language;
malloc() is as standard as &; sqrt() is as standard as +. (Technically,
there are two kinds of
>But C is lower-level. You can *implement* those things inside a C progam
>if you like, but dont have to take on the extra weight if you dont.
>Much more flexible.
>C has NO I/O.
Wrong. stdio is a fully standard part of C. getc() is as standard
as x = *p++.
>The fact that C is used for such a wide variety of things is testimony to
>the incredible flexibility it has by NOT being bound to things liek I/O.
If you want to talk about C being useful for 8051s you are right.
If you are talking about C systems running on Macs, PCs, UNIX boxes,
MVS, CMS, VMS, BeOS, AmigaDOS, then you are talking through your hat.
>only a truth that is based on misdirection. You are obviously mistaken as
>to what C is and what the C libraries are, and are mixing the two fo them up.
Obviously? I think perhaps you have not read the standard with due care
and attention.
>a point to be thought of- Fortan is a high level language, C is not.
>The utility of C is that it is very universally portable and applicable-
>because the laguage itself assumes only the presence of memory, a processing
>capability to perform logical and arithmetic operations, and the ability
>to perform conditional executions.
Oh dear. There are so many misconceptions here that it is hard to know
where to start.
Take the B6700 mainframes (now the A series).
*Lovely* machines. Fortran runs *beautifully* on them, as do
COBOL and Pascal. There _is_ a C compiler for them now, but
the implementors had to fight past C's utterly inappropriate
assumptions about memory. Heck, C wasn't even a good fit to the PC,
thanks to its extremely strong assumptions about memory.
C in practice does not merely assume the PRESENCE of memory,
it demands a FLAT, LINEAR, BYTE-ADDRESSED memory.
There have been plenty of machines with segmented (PC) or tree-structured
(B6700) memories. There have been plenty of machines with word-addressed
memories. The first MIPS designs didn't have byte loads and stores.
The first Alphas didn't have byte loads or stores. I don't remember
which models of the AMD29k if any have byte loads and stores, but the
oldest ones didn't.
While the C _standard_ doesn't say that NULL pointers are all bits zero,
there are enough C programs out there that rely on this that one manufacturer
(Prime) had to add special instructions just for C to their computers.
Those same computers had supported Fortran, COBOL, Pascal, and even PL/I
just fine.
Indeed, I once ran into trouble porting a C program to a machine which
was just your ordinary average M68k UNIX box _except_ that the user's
half of the address space was the _negative_ half, and large chunks of
the code relied on user addresses looking positive when you cast them
to long. "Very universally portable?" I think not.
I'm trying to bring this thread back into relevance to comp.arch, which
is where I am reading it.
The basic point I want to make is that for *most* (not all) tasks, if you
want efficiency, you want a *high* level language, not an old low level
language. Why? Because hardware has changed a lot in the last 20 years
too. On a good modern machine, load/store can be a HUNDRED TIMES SLOWER
than an add (UltraSPARC II: 4-way superscalar, it's fairly easy to fill
all the slots in vector code with a bit of unrolling, load from main
memory is 30 cycles, 30*4 = 120).
There are plenty of tasks where a low level language is just right,
and C is a welcome step up from assembler. (Programming an 8051 is an
area that forcibly suggests itself.) But writing a program that is a
good fit to _this_ year's machine is a good way to end up with a program
that is relatively slow on _next_ year's machine.
Compiler writers are doing truly _awesome_ things these days. I for one
would rather not get in their way.
--
John �neas Byron O'Keefe; 1921/02/04-1997/09/27; TLG,TLTA,BBTNOTL.
Richard A. O'Keefe; RMIT Comp.Sci; http://www.cs.rmit.edu.au/%7Eok
next prev parent reply other threads:[~1997-10-08 4:00 UTC|newest]
Thread overview: 204+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-10-03 4:00 Final kick at the "Merced Guessing Game" Robert Harley
1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` boo
1997-10-07 4:00 ` Richard A. O'Keefe
1997-10-06 4:00 ` Graham Hughes
1997-10-07 4:00 ` boo
1997-10-07 4:00 ` William Clodius
1997-10-07 4:00 ` William Clodius
[not found] ` <y4wwjon203.fsf@mailhost.neuroinformatik.ruhr-uni-bochum.de>
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` Stanley Chow
1997-10-08 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` William Clodius
1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Larry Kilgallen
1997-10-10 4:00 ` Zalman Stern
1997-10-11 4:00 ` Andrew Cruickshank
1997-10-12 4:00 ` Paul D. DeRocco
1997-10-13 4:00 ` Michael Williams
1997-10-08 4:00 ` Gregg E Economou
1997-10-08 4:00 ` Richard A. O'Keefe [this message]
1997-10-08 4:00 ` David Chase
1997-10-07 4:00 ` Carlie Coats
1997-10-07 4:00 ` Paul Hsieh
1997-10-07 4:00 ` boo
1997-10-08 4:00 ` Carlie Coats
[not found] ` <343C3737.5435@Japan.NCR.com>
1997-10-09 4:00 ` C language Craig Burley
[not found] ` <61jc3i$h2q$1@sue.cc.uregina.ca>
1997-10-09 4:00 ` C vs. Fortran - Perl wins Nick Maclaren
1997-10-09 4:00 ` Craig Burley
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` David Gay
1997-10-10 4:00 ` Craig Burley
1997-10-13 4:00 ` Roger Barnett
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-18 4:00 ` Tom
1997-10-07 4:00 ` Final kick at the "Merced Guessing Game" Serge Pachkovsky
1997-10-07 4:00 ` Martin Rodgers
1997-10-07 4:00 ` Greg Weeks
1997-10-07 4:00 ` Martin Rodgers
[not found] ` <343AAE5A.A3FCC9D@no.informatik.spam.tu-muenchen.thanks.de>
1997-10-09 4:00 ` Torben AEgidius Mogensen
[not found] ` <EHsr7B.Dt8@bit3.com>
1997-10-10 4:00 ` Torben AEgidius Mogensen
[not found] ` <61cv5e$qn$6@vixen.cso.uiuc.edu>
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` James C. Stutts
-- strict thread matches above, loose matches on Subject: below --
1997-10-09 4:00 Robert Harley
1997-10-08 4:00 Robert Harley
1997-10-08 4:00 ` Michael Meissner
1997-10-09 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 Robert Harley
1997-10-08 4:00 ` brianh
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` Eric Hildum
1997-10-09 4:00 ` brianh
1997-10-11 4:00 ` Jan Vorbrueggen
1997-10-12 4:00 ` boo
1997-10-13 4:00 ` Michael Williams
1997-10-13 4:00 ` Craig Burley
1997-10-13 4:00 ` Paul Rubin
1997-10-13 4:00 ` Craig Burley
1997-10-13 4:00 ` William Clodius
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-14 4:00 ` Shankar Unni
1997-10-15 4:00 ` Achim Gratz
1997-10-15 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` Paul D. DeRocco
1997-10-15 4:00 ` William Clodius
1997-10-15 4:00 ` Joe Buck
1997-10-16 4:00 ` Richard A. O'Keefe
1997-10-16 4:00 ` Craig Burley
1997-10-17 4:00 ` Shankar Unni
1997-10-14 4:00 ` Michael Williams
1997-10-14 4:00 ` Richard Black
1997-10-15 4:00 ` Michael Williams
1997-10-15 4:00 ` Dr. Richard Black
1997-10-16 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` Craig Burley
1997-10-18 4:00 ` Bruce Hoult
1997-10-15 4:00 ` Paul Hsieh
1997-10-13 4:00 ` boo
1997-10-15 4:00 ` Craig Burley
[not found] ` <623ek6$ef5$1@news.iastate.edu>
1997-10-16 4:00 ` Craig Burley
1997-10-16 4:00 ` SimGraphics
1997-10-17 4:00 ` Craig Burley
1997-10-17 4:00 ` William Clodius
1997-10-19 4:00 ` Craig Burley
1997-10-17 4:00 ` David Chase
1997-10-18 4:00 ` Victor Yodaiken
1997-10-20 4:00 ` Eric Hildum
1997-10-18 4:00 ` Peter L. Montgomery
1997-10-19 4:00 ` Craig Burley
[not found] ` <3456700e.14141203@news.demon.co.uk>
1997-10-28 5:00 ` Dirk van der Knijff
1997-10-20 4:00 ` Richard A. O'Keefe
1997-10-20 4:00 ` Peter L. Montgomery
1997-10-13 4:00 ` Carl Perkins
1997-10-09 4:00 ` Gregg E Economou
1997-10-10 4:00 ` Jan Vorbrueggen
1997-10-08 4:00 ` William Clodius
1997-10-08 4:00 ` David Chase
[not found] ` <61ho3v$3m0$1@goanna.cs.rmit.edu.au>
1997-10-09 4:00 ` boo
1997-10-09 4:00 ` William Clodius
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-10 4:00 ` boo
1997-10-11 4:00 ` Toon Moene
1997-10-11 4:00 ` Paul DeMone
1997-10-11 4:00 ` Patricia Shanahan
1997-10-13 4:00 ` Gregg E Economou
1997-10-13 4:00 ` Patricia Shanahan
1997-10-14 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` boo
1997-10-16 4:00 ` Timothy A. Seufert
1997-10-16 4:00 ` boo
1997-10-16 4:00 ` Toon Moene
1997-10-17 4:00 ` Richard A. O'Keefe
1997-10-20 4:00 ` Jason.Ozolins
1997-10-10 4:00 ` Tyson Richard DOWD
1997-10-12 4:00 ` boo
1997-10-13 4:00 ` Patricia Shanahan
1997-10-15 4:00 ` boo
1997-10-15 4:00 ` Patricia Shanahan
1997-10-13 4:00 ` Steve Tate
1997-10-13 4:00 ` Bernd Paysan
1997-10-13 4:00 ` boo
1997-10-13 4:00 ` Aaron Spink
1997-10-14 4:00 ` boo
1997-10-18 4:00 ` tgg
1997-10-13 4:00 ` boo
1997-10-13 4:00 ` Victor Yodaiken
1997-10-14 4:00 ` Aaron Spink
1997-10-14 4:00 ` Jason.Ozolins
1997-10-15 4:00 ` boo
1997-10-15 4:00 ` David Chase
[not found] ` <EHrwv9.2w3@world.std.com>
1997-10-10 4:00 ` David Gould
1997-10-10 4:00 ` Maynard Handley
1997-10-10 4:00 ` David Gould
1997-10-16 4:00 ` Patricia Shanahan
1997-10-08 4:00 Robert Harley
[not found] ` <343C0387.41C6@lanl.gov>
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` Patrick Chase
1997-10-10 4:00 ` boo
1997-10-09 4:00 ` David Chase
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` William Clodius
1997-10-09 4:00 ` David Chase
1997-10-07 4:00 Robert Harley
1997-10-07 4:00 ` Martin Rodgers
1997-10-07 4:00 ` Shankar Unni
1997-10-08 4:00 ` boo
1997-10-09 4:00 ` Patrick F. McGehearty
1997-10-10 4:00 ` Richard A. O'Keefe
1997-10-15 4:00 ` David Chase
1997-10-16 4:00 ` William Clodius
1997-10-07 4:00 ` Nick Maclaren
1997-10-02 4:00 Robert Harley
1997-10-02 4:00 ` Nick Maclaren
1997-10-03 4:00 ` Richard A. O'Keefe
1997-10-02 4:00 Robert Harley
1997-10-02 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Stanley Chow
1997-09-30 4:00 Paul DeMone
1997-09-30 4:00 ` Guy Harris
1997-10-01 4:00 ` Tom Thornhill
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` Paul DeMone
1997-10-01 4:00 ` J. Corbally
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` Ketil Z Malde
1997-10-01 4:00 ` Michael D. Nahas
1997-10-01 4:00 ` brianh
1997-10-01 4:00 ` Stefan Monnier
1997-10-01 4:00 ` Nick Maclaren
1997-10-01 4:00 ` Allen Kim
1997-10-01 4:00 ` P Murray
1997-10-01 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Vesa Karvonen
1997-10-02 4:00 ` Joseph H Allen
1997-10-02 4:00 ` Wilco Dijkstra
1997-10-03 4:00 ` Jason.Ozolins
1997-10-03 4:00 ` Alex Colvin
1997-10-06 4:00 ` Richard A. O'Keefe
1997-10-08 4:00 ` Zalman Stern
1997-10-03 4:00 ` Stefan Monnier
1997-10-03 4:00 ` Stefan Monnier
1997-10-02 4:00 ` Andrew Glew
1997-10-02 4:00 ` Torben AEgidius Mogensen
1997-10-02 4:00 ` Patrick F. McGehearty
1997-10-02 4:00 ` brianh
1997-10-03 4:00 ` Michael Williams
1997-10-01 4:00 ` John Wilson
1997-10-02 4:00 ` Jon Leech
1997-10-02 4:00 ` Stefan Monnier
1997-10-03 4:00 ` Richard A. O'Keefe
1997-10-03 4:00 ` Mike Smith
1997-10-03 4:00 ` Nick Maclaren
1997-10-03 4:00 ` Rob Barris
1997-10-03 4:00 ` Andrew Glew
1997-10-05 4:00 ` Gianni Mariani
1997-10-04 4:00 ` Nick Maclaren
1997-10-04 4:00 ` H. Eckert
1997-10-05 4:00 ` Andy "Krazy" Glew
1997-10-06 4:00 ` Nick Maclaren
1997-10-02 4:00 ` Eric Hildum
1997-10-01 4:00 ` Tom Thornhill
1997-10-01 4:00 ` Paul DeMone
1997-10-01 4:00 ` Jim Hull
1997-10-01 4:00 ` Richard A. Schumacher
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox