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