Kernighan was not a "creator" of C
by
GenChalupa
·
· Score: 4
>Mihai Budiu wrote to us with an interview
>done with Brian Kernighan, one of the High
>Creator's of C
Brian Kernighan is not a "high creator" of C. All he did was write the book with DMR. Here's an exact quote from the interview, which you obviously did not read:
I can't comment on the ``worse'', but remember, C is entirely the work of Dennis Ritchie
Every time KDevelop, Kylix, Code Warrior or another GUI programming tool is mentioned here, we always get comments like this saying something to the effect of, "The existence of GUI programming tools is bad. Good code can only be written from the command line."
I was interested to see Kernighan say, When I write code on Windows I use typically the Microsoft development environment: they know where all the files are, and how to get all the include files and the like, and I use them, even though in many respects they don't match the way I want do business."
C was a successor to BCPL, a rather lame programming language from 1967. (In some circles, it was known as the British Cruddy Programming Language.) Some important early work was done in BCPL, including the low-level code for the Xerox Alto.
BCPL didn't really have types; everything was a "word", much like assembler or PL/M.
With Pascal available to show the way, C was
the next logical step - sort of a BCPL with types.
In many ways, Pascal was a better language, but Pascal had some inane limitations that stemmed from Wirth's academic orientation. Even Knuth criticized such things as Wirth's flat refusal to allow a "default" on case statements. "This is mindless pedantism up with which I will not put", Knuth wrote. Pascal also originally came with a lame I/O system designed for the CDC 6600 (a '60s supercomputer), no separate compilation, and no
compile-time arithmetic, so you couldn't write
"var tab[0..lim-1]" when "lim" was a constant.
Unfortunately, that painful version became an ISO standard, leading a generation of programmers to beat their heads against the walls of the language.
This left an opening for C, which came with a system programmer oriented I/O library and, in time, a whole OS with free source code. Still, for much of the 1970s and through the mid-80s, serious researchers used Pascal. The Apple Lisa and the MacOS, for example, were in a dialect of Pascal,
as were most early Mac applications.
(The Lisa even had an object-oriented variant
of Pascal by 1983.)
What killed Pascal, I think, is that Berkeley
UNIX came with a truly lame Pascal implementation. Its horribly inefficient subscript checking implementation (a subroutine call for every subscript check) and miserable generated code
convinced a generation of programmers that
Pascal sucked. Still, the microcomputer world
got a lot of work done with Turbo Pascal in the 1980s. It wasn't until the rise of Microsoft (a C shop)
and the fall of Borland (a Pascal shop) that Pascal was crushed. One could argue that the
decline of Pascal reflects Microsoft's dominance.
In many ways, Pascal was a better language, but Pascal had some inane limitations that stemmed from Wirth's academic orientation.
Fortunately, BORLAND sufficiently hacked at Pascal, and turned it into a much more useful product than C.
It's no accident that Apple developped it's Macintosh with Object Pascal.
Oberon is an OS and language, combined. I don't know enough about it to provide any greater detail.
Okay, let's see. First of all, it's available for download here, if memory serves me right. It runs as an application under Windows, Mac OS and Linux, as well as natively on PCs and on the ETH's own architecture.
For those who haven't programmed in Modula: it feels quite a bit like Pascal. But in a good way. It's high(er)-level, safe(r), "really" OO - all those things that C/C++ isn't. It's a joy for programming big systems, although a bit cumbersome for small ones - you do find yourself wishing you were using Perl. The OS itself is quite different from anything I'd ever used before, both its UI (not window-based, rather more reasonable, and I suppose it'd be easier to learn for a newbie, but I'm addicted to this damned WIMP paradigm, so I had a hard time with it) and its guts (it's a truly open system; everything is a module, written in the same language, communicating directly through the language primitives - no need for dumb-ass IPC, marshaling or "lowest common denominator" file formats; it reminds me a bit of Symbolics' Genera OS that ran on Lisp Machines).
I can't really say much more about it, but I do recommend that the reader downloads it and tries it out for himself.
-- To the editors: your English is as bad as your Perl. Please go back to grade school.
2 things I liked about this interview...
by
Vuarnet
·
· Score: 4
I really liked this interview, as it gave me some insight on how those Old Masters of Coding of the Days of Yore think. Or, at least, one of them. Here's the first thing that got my attention: Teaching students skills so that they can step immediately into a Windows development shop and are able to write COM programs is just not right. That's not what universities should be doing; universities should be teaching things which are likely to last, for a lifetime if you're lucky, but at least 5 or 10 or 20 years, and that means principles and ideas. At the same time, they should be illustrating them with the best possible examples taken from current practice.
Now if only this interview was posted earlier, we could've used it on the discussion about what makes a good CS project a few weeks ago, which you can find
here on Slashdot.
The other thing is I liked the most about this interview was this quote: ...the areas that are difficult are only two: one that it's too hard to write programs that work, and the other that it's too hard to use computers. So if you want things to work on, these are two that you could try.
I think I'm gonna frame this and hang it right beside my computer screen. Or append it on any bill we send to our clients.
-- Tongue-tied and twisted, just an earth-bound misfit, I Learning to fly, Pink Floyd.
C is a loaded gun aimed at your foot; C++ is a Gatling gun aimed at your head. Describing C as much, much more powerful than C++ isn't just wrong, it's ridiculous.
Neither one is more powerful than the other. What the hell does "power" mean in a programming language, anyway? The word has no definition in a programming context.
The only relevant question, IMO, is which is the right tool for the job?
Sometimes, the job requires procedural programming. For that, procedural C++ or C is called for. Sometimes, the job requires object-oriented programming. For that, C++ or object-oriented C is called for. Sometimes, the job requires generic programming. For that, C++ or really hoary C is called for.
C++ is probably more versatile than C, but it comes at significant cost--compilers become complex, the STL is difficult to maintain, etc.
There is no clear "more powerful" language. Use the right tool for the job.
And insofar as operator overloading in C++... I use it all the time. Where's the problem?
I had the old guy as my professor for CS50, which is the first computer class you take at Harvard. It was nice to see him bitch about people being trained in Visual C++; I assume he was complaining about Princeton, because at Harvard it was strictly C on Unix. (C++ was taught in CS51, but still in a Unix environment.)
He is an incredibly endearing fellow. In the first class, to demonstrate the concept of an algorithm, he had the class (of 400+) shout out instructions on how to make him trim his beard. He spread out several instruments of cutting (including a small chain saw...the guy has a nice sense of humor) on the desk in front of him, and would ignore any directions that comprised more than one action. So, if somebody would say "Pick up the scissors!" he would reply, robot like, "What are scissors?"
So, you'd have to say things like "Extend your right hand 4 inches", etc. In the end, he even cut of a small amount of his beard, to the immense cheers of the class.
He's one of the more intriguing characters in CS history, the "k" in "awk", always tagging along on some of the more interesting projects in (C, Unix), but never really striking out on his own.
The cool thing is, he is very self deprecating and would be the first person to admit his shortcomings.
Awesome professor, as his enthusiasm for even the simple aspects is always evident. He loves the stuff, and thus you want to love it as well.
A cool note, he is the person who invented the concept of creating a program to print "Hello world".
>Mihai Budiu wrote to us with an interview
>done with Brian Kernighan, one of the High
>Creator's of C
Brian Kernighan is not a "high creator" of C. All he did was write the book with DMR. Here's an exact quote from the interview, which you obviously did not read:
I can't comment on the ``worse'', but remember, C is entirely the work of Dennis Ritchie
GenChalupa
Bob's Quick Guide to the Apostrophe, You Idiots
I was interested to see Kernighan say, When I write code on Windows I use typically the Microsoft development environment: they know where all the files are, and how to get all the include files and the like, and I use them, even though in many respects they don't match the way I want do business."
See, you're allowed to use them! It's OK!
---------
In many ways, Pascal was a better language, but Pascal had some inane limitations that stemmed from Wirth's academic orientation. Even Knuth criticized such things as Wirth's flat refusal to allow a "default" on case statements. "This is mindless pedantism up with which I will not put", Knuth wrote. Pascal also originally came with a lame I/O system designed for the CDC 6600 (a '60s supercomputer), no separate compilation, and no compile-time arithmetic, so you couldn't write "var tab[0..lim-1]" when "lim" was a constant. Unfortunately, that painful version became an ISO standard, leading a generation of programmers to beat their heads against the walls of the language.
This left an opening for C, which came with a system programmer oriented I/O library and, in time, a whole OS with free source code. Still, for much of the 1970s and through the mid-80s, serious researchers used Pascal. The Apple Lisa and the MacOS, for example, were in a dialect of Pascal, as were most early Mac applications. (The Lisa even had an object-oriented variant of Pascal by 1983.)
What killed Pascal, I think, is that Berkeley UNIX came with a truly lame Pascal implementation. Its horribly inefficient subscript checking implementation (a subroutine call for every subscript check) and miserable generated code convinced a generation of programmers that Pascal sucked. Still, the microcomputer world got a lot of work done with Turbo Pascal in the 1980s. It wasn't until the rise of Microsoft (a C shop) and the fall of Borland (a Pascal shop) that Pascal was crushed. One could argue that the decline of Pascal reflects Microsoft's dominance.
I really liked this interview, as it gave me some insight on how those Old Masters of Coding of the Days of Yore think. Or, at least, one of them. Here's the first thing that got my attention:
...the areas that are difficult are only two: one that it's too hard to write programs that work, and the other that it's too hard to use computers. So if you want things to work on, these are two that you could try.
Teaching students skills so that they can step immediately into a Windows development shop and are able to write COM programs is just not right. That's not what universities should be doing; universities should be teaching things which are likely to last, for a lifetime if you're lucky, but at least 5 or 10 or 20 years, and that means principles and ideas. At the same time, they should be illustrating them with the best possible examples taken from current practice.
Now if only this interview was posted earlier, we could've used it on the discussion about what makes a good CS project a few weeks ago, which you can find here on Slashdot.
The other thing is I liked the most about this interview was this quote:
I think I'm gonna frame this and hang it right beside my computer screen. Or append it on any bill we send to our clients.
Tongue-tied and twisted, just an earth-bound misfit, I
Learning to fly, Pink Floyd.
C is a loaded gun aimed at your foot; C++ is a Gatling gun aimed at your head. Describing C as much, much more powerful than C++ isn't just wrong, it's ridiculous.
Neither one is more powerful than the other. What the hell does "power" mean in a programming language, anyway? The word has no definition in a programming context.
The only relevant question, IMO, is which is the right tool for the job?
Sometimes, the job requires procedural programming. For that, procedural C++ or C is called for. Sometimes, the job requires object-oriented programming. For that, C++ or object-oriented C is called for. Sometimes, the job requires generic programming. For that, C++ or really hoary C is called for.
C++ is probably more versatile than C, but it comes at significant cost--compilers become complex, the STL is difficult to maintain, etc.
There is no clear "more powerful" language. Use the right tool for the job.
And insofar as operator overloading in C++... I use it all the time. Where's the problem?
I had the old guy as my professor for CS50, which is the first computer class you take at Harvard. It was nice to see him bitch about people being trained in Visual C++; I assume he was complaining about Princeton, because at Harvard it was strictly C on Unix. (C++ was taught in CS51, but still in a Unix environment.)
He is an incredibly endearing fellow. In the first class, to demonstrate the concept of an algorithm, he had the class (of 400+) shout out instructions on how to make him trim his beard. He spread out several instruments of cutting (including a small chain saw...the guy has a nice sense of humor) on the desk in front of him, and would ignore any directions that comprised more than one action. So, if somebody would say "Pick up the scissors!" he would reply, robot like, "What are scissors?"
So, you'd have to say things like "Extend your right hand 4 inches", etc. In the end, he even cut of a small amount of his beard, to the immense cheers of the class.
He's one of the more intriguing characters in CS history, the "k" in "awk", always tagging along on some of the more interesting projects in (C, Unix), but never really striking out on his own.
The cool thing is, he is very self deprecating and would be the first person to admit his shortcomings.
Awesome professor, as his enthusiasm for even the simple aspects is always evident. He loves the stuff, and thus you want to love it as well.
A cool note, he is the person who invented the concept of creating a program to print "Hello world".