12 ms·
Which you can then use to recompile your OS easily (FreeBSD, some Linux based OS's) and tune it to a specific machine / configuration. That's why people like K
by lucian303 14y ago
Which you can then use to recompile your OS easily (FreeBSD, some Linux based OS's) and tune it to a specific machine / configuration.
That's why people like Kernighan and Ritchie (RIP) are so well respected. They wrote C to the target language first (asm) then rewrote C in C once they had a good enough compiler. Considering that C is the cornerstone of UNIX and modern variants I'd say this is no small feat.
C will be around for a long time after many of the current languages, domain specific or not, become just another wikipedia entry.
- pm215 14y agoActually (according to Ritchie's description of the history of C at http://cm.bell-labs.com/cm/cs/who/dmr/chist.html http://cm.bell-labs.com/cm/cs/who/dmr/chist.html) they never wrote a C compiler in asm. Instead it was a gradual process of evolution, so the first C compiler would have been written in B; and the B compiler was itself written in B and self-hosting, bootstrapped from a B compiler written in a thing I've never heard of called TMG. None of which is to downplay their achievements at all (I still write C full-time); but it's interesting that even in a period of computing history where operating systems were generally written in assembly language, compilers were bootstrapped from other high level languages.
- hnriot 14y agoCalling B a high level language is something of a stretch.
- rbanffy 14y agoNowadays, the same can be said of C.
- lucian303 14y agoNowadays? C was never a high level language except and wasn't designed to be. Mid-level yes. As in just above asm.
- rbanffy 14y agoThere was a time being above asm, having non-register data types, functions and libraries was considered being a high-level language. I'd consider C higher level than FORTRAN 77, for instance. You just need to be old enough ;-)
- lucian303 14y agoYes, I forgot about B. :) "Ritchie wrote a compiler using TMG which produced machine code." vs Ken Thompson's B compiler that produced threaded code.
- saraid216 14y ago> C will be around for a long time after many of the current languages, domain specific or not, become just another wikipedia entry. Off-topic, but this is a rather amusing benchmark for irrelevance. I suspect that deletionism would not permit it to be true, either.