Slashdot Mirror


An Interview with Brian Kernighan

Mihai Budiu wrote to us with an interview done with Brian Kernighan, one of the High Creator's of C. Good reading and good perspective on C.

144 comments

  1. 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

    GenChalupa

    1. Re:Kernighan was not a "creator" of C by Stephen+Samuel · · Score: 2
      He didn't create it, but he was a large part of making it popular. I pretty much learned C from 'the C bible'. This is true of many other people. The book defined what Ritchie created. People followed it (partly to remain compatible with Unix, partly because this was the document.

      He may not have been a high creator, but he could definitely be called a high priest of the C language.

      --
      Free Software: Like love, it grows best when given away.
  2. Aiighh! Apostrophe's! by frogstar · · Score: 4
    1. Re:Aiighh! Apostrophe's! by joey · · Score: 2

      Thank's for you're help!

      --

      --
      see shy jo
    2. Re:Aiighh! Apostrophe's! by Kickasso · · Score: 2
      Another advanced guide.
      It's is not, it isn't ain't, and it's it's, not its, if you mean it is. If you don't, it's its. Then too, it's hers. It isn't her's. It isn't our's either. It's ours, and likewise yours and theirs.

      -- Oxford University Press, Edpress News


      --
    3. Re:Aiighh! Apostrophe's! by bowb · · Score: 1

      Why would you want to do that? You shouldn't believe everything you're told.

    4. Re:Aiighh! Apostrophe's! by hobbit · · Score: 1

      Why would you want to do that?

      Because an apostrophe indicates a contraction. Mind you, to be grammatically correct in the traditional sense, TLA should be spelled T.L.A.

      You shouldn't believe everything you're told.

      Nowhere is this truer than on Slashdot. Aaargh! Reminds me of the liar paradox.

      Hamish

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
    5. Re:Aiighh! Apostrophe's! by hobbit · · Score: 1

      It's P.C's, not PCs or PC's. However, since no-one writes P.C. any more, PCs seems an acceptable evolution.

      however i'm still at a loss as to what to do when i'm emailing a quick note and i don't bother with the shift key. is pc's clearer than pcs?

      The '90s vs 90's thing is not clear-cut either. Arguably, 90's is correct because the word nineties is, without extenuating context, used to refer exclusively to the period between 1990 and 1999, and the word nineties is being contracted, hence the apostrophe. However, your position is also perfectly reasonable.

      Hamish

      P.S. It's thingy and thingies. :)

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
    6. Re:Aiighh! Apostrophe's! by bowb · · Score: 1
      Because an apostrophe indicates a contraction. [...]

      No, TLA (for example) is already in its contracted form, adding an apostrophe when pluralizing it isn't necessary. (Supposing that it would make sense to pluralize it.)

      Nowhere is this truer than on Slashdot. Aaargh! Reminds me of the liar paradox.

      I'll have to think about that one ...

    7. Re:Aiighh! Apostrophe's! by NME · · Score: 1

      "Let our Battle's Begin!" --L'postrophe

      Bob rules

      -nme!

    8. Re:Aiighh! Apostrophe's! by hobbit · · Score: 1

      No, TLA (for example) is already in its contracted form, adding an apostrophe when pluralizing it isn't necessary. (Supposing that it would make sense to pluralize it.)

      I disagree. For a start, I think that TLA is an incorrect form of T.L.A. (the word acronym used to refer to a pronuncible contraction, although its meaning has changed somewhat in the computing age). Secondly, it's arguable that the contraction of Three Letter Acronyms is TLA (or T.L.A.), but in order to make it read better we include the S. The rule of thumb (there are probably exceptions) is that if letters are removed to the end of the word, a period is used (e.g., e.g., Prof.), but if the start of the word is omitted, or the word is later resumed, an apostrophe is used (e.g., they're, shouldn't). Hence, T.L.A's. Of course, TLAs is just as correct or otherwise as TLA, but I prefer the form TLA's, since it means (as I've indicated elsewhere in this thread) that I can write emails entirely in lowercase without confusing the reader.

      Hamish

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
    9. Re:Aiighh! Apostrophe's! by hobbit · · Score: 1

      My English usage guide explicitly says...

      Of course your mileage may vary :) I suspect that your English usage guide is both modern and American. My grammar is learned from British literature and from British parents.

      With respect to pluralising abbreviations (such as KOs, MPs, SOSs and TLAs), my guide states an s should be added, without an apostrophe. The pluralised form of the original phrase is not relevant (imagine what your suggestion would result in where the final word isn't pluralised with an s).

      This seems a little inconsistent. Wouldn't this make the plural of SOS, SOSes?

      Hamish

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
  3. Mr C by l33t · · Score: 3

    I'd hardly call him a high creator. The man is 5' 6", tops. That's hardly tall. I'd say I could take him (I mean this in a non-homosexual way). Why is slashdot even mentioning his height? This is hardly 'News for Nerds' now is it? Now ESR, he's a tall man. Not to mention RMS. FDR wasn't that tall I believe, sat down a lot anyhow. Lincoln, well of course he was tall, what with that hat. I don't think he was involved in the development of C.

    1. Re:Mr C by renehollan · · Score: 1

      I've met RMS. He appeared to be of average (male) height to me: perhaps 5'10" to 6' tops. FWIW, I'm shorter than average, at 5'7" - RSH

      --
      You could've hired me.
  4. Good Read by cansecofan22 · · Score: 3

    It was a real good article. I think more of the newer users of Linux should read a little more about people like this and a few other more important "personalities" of the Unix and programming and networking worlds. It will give you a much higher appreciation of the roots of Unix and therefore Linux also.

    --
    "If ignorance is bliss, why aren't there more happy people in the world?"
    1. Re:Good Read by leibold · · Score: 1

      I don't know whether knowing the history of Linux/Unix is necessary to appreciate the operating system, but it probably doesn't hurt. I do agree with you that this was an excellent interview. It is very obvious that the interviewer had done his homework and came with many good questions. If Mihai is reading these comments: thanks a lot!

    2. Re:Good Read by DrQu+xum · · Score: 1

      It was a real good article. I think more of the newer users of Linux should read a little more about people like this and a few other more important "personalities" of the Unix and programming and networking worlds. It will give you a much higher appreciation of the roots of Unix and therefore Linux also.

      This is pretty necessary in my view -- too many of these so-called "experts" (which is rumoured to be the E in MCSE*) have no idea about the history of computing.
      I once made reference to BWK to a friend of mine (a CN[AE] no less) who had no idea who I was talking about. I ended up teaching him about The Gods of Murray Hill for about half an hour (he didn't know of DMR and Ken Thompson either.) The poor bastard.

      * MCSE = "Minesweeper Consultant/Solitare Expert"

      --
      DrQu+xum: Proof that the lameness filter doesn't work.
  5. Re:C or C++ by l33t · · Score: 1

    No, you're mistaken. I think C is much, much more powerful than C++. Not to mention easy to use. I mean, have you even looked at operator overloading in C++?! Whoever developed that was having a laugh... who the hell would ever remember that?

  6. Re:They forgot one question by l33t · · Score: 1

    Who *wouldn't* be delighted to be one of the creators of C++?

  7. Re:They forgot one question by Ho+hum · · Score: 1

    C++ sucks, but I love bearded guys!

  8. The best balance between power and expressiveness by Chalst · · Score: 1
    ...is C?

    Well, I think C scores impressively highly considering its age, but
    surely scheme beats it! It's far more expressive, and gives pretty
    good resource predictability, due to its simple execution model,
    uniform syntax and treatment of data. And, if I had just one compiler
    on a desert island, I can't think I'd choose one without garbage
    collection :-

  9. Is anyone else disturbed by a two line topic? by J23SE · · Score: 1



    Hemos, damnit. Reading the actual story is more important to your web site than reading about bestiality for jerk off material.

    If you can't make up more than two lines about the interview, then it's obviously not worthy to be featured on Slashdot.

    That's my opinion. Flame me!

    1. Re:Is anyone else disturbed by a two line topic? by Antipop · · Score: 1

      Actually, in a maximized Netscape window at 1600x1200 the topic is a little over a half a line.

      -Antipop

  10. Warning! by Anonymous Coward · · Score: 1

    Thank God for the perpetuation of the use of an apostrophe as warning of upcoming pluralization's.

  11. Using an IDE by update() · · Score: 5
    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."

    See, you're allowed to use them! It's OK!

    ---------

    1. Re:Using an IDE by update() · · Score: 1
      Errr, apparently you can't link to comments in an archived story. See the first post (#7) here.

      ---------

    2. Re:Using an IDE by afc · · Score: 2

      Your comment sounds a little bogus. I have never seen a young /.er eulogizing the use of cat(1) and sed(1) for program development. Yes, a sizeable amount of them extol the virtues of vi(1) (supposedly to stay truthful to the nature of UN*X, as if vi(1) were an original part of UN*X) as a great programming tool, but I would hardly call vi(1) a command line program.
      --

      --
      Information wants to be beer, or something like that.
    3. Re:Using an IDE by Anonymous Coward · · Score: 2

      You really took that quote out of context. He says that he prefers to use text tools and UNIX, but on Windows the MS development tools already know where to find all of the files, so he uses those. He says "in many respects they don't match the way I want do business", which does not suggest deep love for the tools. I'm not saying that IDEs are bad, but this quote really doesn't say they're good.

    4. Re:Using an IDE by pen · · Score: 1
      You have to use an anchor instead, like so: slashdot.org/articles/00/05/04/0458238.shtml#7

      --

    5. Re:Using an IDE by pb · · Score: 1

      Well, watch closely. I can't stand vi. 'cat' and 'sed' are excellent tools. But I think what *he* was talking about was using some sort of text-based, interactive editor *from* the command line, and using the compiler entirely from the command line, and writing your program that way.

      Hey, why isn't vi a CLI program, eh? Just 'cause it has that "EIGHT KILOBYTES of cursor positioning code"? I mean, really, what's wrong with xvi? Is it that megabyte of display-independent graphics code? Oh well. Ed. Ed is the standard. Text editor. ;)
      ---
      pb Reply or e-mail; don't vaguely moderate.

      --
      pb Reply or e-mail; don't vaguely moderate.
    6. Re:Using an IDE by RickHunter · · Score: 2

      No! That's just what they WANT you to think! Its really all a conspiracy. See, if you use their IDE, they can then implant subliminal messages in your code to take over the minds of those who run your program.......

      In fact, how do I know they didn't do that to this web browser? They're everywhere


      -RickHunter
    7. Re:Using an IDE by Frymaster · · Score: 1
      using some sort of text-based, interactive editor *from* the command line,

      gee, I use my ide from the command line:

      [frymaster]/home/frymaster:%> cwide &

      ta-daaa!!

    8. Re:Using an IDE by pb · · Score: 1

      :) I know, right? That's why I made those comments about X and ncurses...

      Personally, I like rhide, which is still text-mode, but...
      ---
      pb Reply or e-mail; don't vaguely moderate.

      --
      pb Reply or e-mail; don't vaguely moderate.
    9. Re:Using an IDE by update() · · Score: 1
      You really took that quote out of context. He says that he prefers to use text tools and UNIX, but on Windows the MS development tools already know where to find all of the files, so he uses those.

      Actually, I included even though in many respects they don't match the way I want do business in the text I quoted, although I realized it weakens my point, because I wanted to acknowledge the context. But the main point I wanted to make is that Brian Kernighan uses an IDE where it works for him -- and that the people who say that no worthwhile code could ever be written in anything but a console or an xterm should take note.

      ---------

    10. Re:Using an IDE by mrdlinux · · Score: 1

      In moderating this comment, a new category is needed: "Paranoid"
      ;)

      Even paranoids have enemies

      --
      Those who do not know the past are doomed to reimplement it, poorly.
    11. Re:Using an IDE by theonetruekeebler · · Score: 1
      Ah, but did you read the very next sentence?
      I also use good old-fashioned Unix tools; when I run Windows I typically import something like the mks toolkits and I have standard programs that I'm used to for finding things and comparing them and so on.
      I took the entire statement to read, "I use MS tools to do Windows because I don't want to have to bother with all the obscure, non-portable elements of the Windows development environment. Furthermore, in order to get actual work done under Windows, I set up a Unix emulation for my environment."

      --
      --
      This is not my sandwich.
    12. Re:Using an IDE by shippo · · Score: 2

      Furthermore, look at the headers of any of Dennis Ritchie's posts on alt.folklore.computers. dmr uses Netscape on NT to post to usenet.

  12. Offtopic Re:Is anyone else disturbed by... by JanneM · · Score: 1

    That's my opinion. Flame me!

    Ahem... Please consider yourself flamed... Don't really want to do this, but since you asked, I'll oblige.

    --
    Trust the Computer. The Computer is your friend.
  13. eqn - XML by tobyjaffey · · Score: 3

    In the interview it says that Kernighan is currently hacking eqn to output XML/HTML (presumably MathML?). This has been suggested as a CS thesis title at my university, fortunately I decided that it was far too sick a task to even think about.

    eqn is kinda cool (given that it works wonderfully on pipelines with troff in cunning ways). But, surely by now all old eqn documents have been converted to TeX or MathML anyway? Does anyone outside of Bell Labs actually have any eqn documents?

  14. Re:C or C++ by QuoteMstr · · Score: 2

    Oh, please. C++ is (basically) a superset of C. You can do anything you can do in C in C++, and you can take advantage of *some* CC features (e.g., references, function templates, etc) even without having to use classes and OOP. Stop spreading your FUD.

  15. Few C++ compilers fully support the standard by Ars-Fartsica · · Score: 2
    Although it is quite old now, there aren't many compilers that fully support the C++ standard. I know of Kai's compiler as the only one that currently support the full standard on linux.

    Hence there is still a need for C if you need portability across platforms and compilers. C++ doesn't offer cross-compiler portability on a meaningful scale just yet.

  16. Re:C or C++ by rjh · · Score: 2

    Warning: I am a C++ hacker, and I like it a hell of a lot.

    Answer: People are using C++. Every single program in The C Programming Language is a perfectly good and valid C++ program; in fact, Bjarne Stroustrup himself recommends reading The C Programming Language as a way to improve one's C++ skills.

    The advantage of C++ is that it's a hell of a toolbox. You've got hammers, screwdrivers, chisels and even a fully-functioning wood lathe (watch me turn this chunk of hoary code into a table leg!). Good programmers use the right tool for the job.

    And if the right tool for the job happens to be procedural programming, C (or procedural C++) is an entirely reasonable thing to do.

  17. Re:The best balance between power and expressivene by QuoteMstr · · Score: 2

    Scheme is a dialect of Lisp, which dates back to the time of FORTRAN and COBOL. It's hardly new. (I happen to prefer Common Lisp myself)

  18. Early C history by Animats · · Score: 5
    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.

    1. Re:Early C history by Pig+Hogger · · Score: 4
      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.
    2. Re:Early C history by ucblockhead · · Score: 2

      Borland may have been a Pascal shop, but they had a damn fine C compiler in the early eighties.

      --
      The cake is a pie
    3. Re:Early C history by FFFish · · Score: 3

      Might as well continue the Pascal thread, by mentioning that Wirth then went on to address Pascal's deficiencies by creating Modula, and then Oberon.

      Modula is fully capable of support systems programming: you can write OSes, drivers, whatever. In that regard, it is as powerful as C. Unlike C, it has an excellent syntax and superlative large-project structures. You haven't experienced wonderful programming until you've experienced interface modules that are kept completely seperate from the corresponding code modules.

      Oberon is an OS and language, combined. I don't know enough about it to provide any greater detail.

      Modula-3 is a DEC initiative to develop the best p ossible large-project/team-project programming language. There are a *lot* of ideas and tools in the Modula-3 world that should be liberally stolen and redeployed in other languages.

      I might also mention that Turbo Pascal is, in most ways, just a Borland interpretation of Modula-2. Indeed, it was originally suppposed to be named for Modula, but the marketing 'droids realized that pretending it was Pascal was a wise and politic move.


      --

      --

      --
      Don't like it? Respond with words, not karma.
    4. Re:Early C history by Dollyknot · · Score: 1

      Come on language, it should be like english. I know I should be dead, but I haven't got there yet.

      --
      It's called an elephant's trunk whereas it is in fact, an elephant's nose, a nose by any other name would smell as sweet
    5. Re:Early C history by Dollyknot · · Score: 1

      I do appologise, for my previous comments, my excuse is I'm pissed

      --
      It's called an elephant's trunk whereas it is in fact, an elephant's nose, a nose by any other name would smell as sweet
    6. Re:Early C history by Kaufmann · · Score: 4

      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.
    7. Re:Early C history by Fake_Kaufmann · · Score: 1
      (define *sig* "The real Kaufmann doesn't post often enough to have any impostors.")

      Hah! Shows what you know!

    8. Re:Early C history by Stephen+Samuel · · Score: 2
      In many ways, Pascal was a better language, but Pascal had some inane limitations that stemmed from Wirth's academic orientation....
      Wirth didn't really intend for Pascal to be a general-use language (second paragraph). It was intended as quick, cheap general-purpose language that was easy to compile for and easy to learn, while allowing students to play with most of the early concepts of CS. The expectation was that, once they learned Pascal, students would go on to a 'real' language like Algol/68 or (later) Modula.

      The problem is that, once students learned Pascal, they tried to do everything in it, rather than going on to a 'real' language. This human quirk is precisely why many companies will try and get their products into schools and universities -- once people get used to product 'X' they'd rather pay the price of staying with it than learn a new, possibly better, system.

      If you look at Pascal as a light-duty 'introductory' programming language that was supposed to be easy to write compilers for (probably in a language other than Pascal), then it makes LOTS more sense. (e.g. the lack of compile-time math is fine if you want to actually discourage people from using pascal in large systems, and it makes the compiler a bit easier to write). The only place that Pascal really fails is that it's actually 'good enough' that it didn't completely discourage students from using it on real world problems.

      --
      Free Software: Like love, it grows best when given away.
    9. Re:Early C history by fm6 · · Score: 1
      What killed Pascal, I think, is that Berkeley UNIX came with a truly lame Pascal implementation.

      Pascal is dead? I hope nobody tells my employer. It's paying me a lot of money to document Pascal APIs!

      Seriously, though, you raise an interesting point, if you rephrase from "what killed Pascal" to "why C overtook Pascal as a standard language." I don't think you can blame Berkeley Pascal. I can't cite specific figures, but I doubt if Berkeley Pascal was ever as widely used as any commercial Pascal compiler, especially Turbo Pascal.

      Pascal probably suffered more from the ascendency of Unix, which is closely tied to C. And in general, C is better than older dialects of Pascal for writing APIs. Kernighan has a classic paper on the topic. (Apologies for the unstable link. Bell Labs appears to be re-organizing their web site.)

      But on rereading "Why Pascal is not my Favorite Program Language" for the first time in many years, I made an interesting discovery. All of Kernighan comments are insightful, but all but one point is now simply out of date. (For example, Borland's Object Pascal is much more extensible than Wirth's original classroom language.) The one point he makes that still applies after a couple of decades is this: Pascal is designed to be compiled in a single pass. Kernighan objects that this makes for source code that reads "from the bottom up" and to related limitations on the order of declarations.

      what makes this interesting is that this one "limitation" of Pascal works out very well in Borland's current Delphi product. In a RAD tool, source code organization is the IDE's problem, not the programmer's. And having a single-pass language means you can have IDE features that rely on on-the-fly parsing, such as automatic code completion. Borland's C++ Builder (which is essentially a tool for writing Delphi programs in C++) also has this feature, but it is much less usable in that product, due to the multiple passes you need to resolve a reference in C++.

      And of course, Pascal programs compile a lot faster than equivalent C++. I was recently playing with a Linux Pascal compiler (I think you can guess which one) and was somewhat bemused to find that roughly 40% of my compile time was used up by the copyright notice displayed at the beginning of each compile!

    10. Re:Early C history by Kaufmann · · Score: 1

      Wow! I have my own impostor now! I'm so fucking honoured!

      --
      To the editors: your English is as bad as your Perl. Please go back to grade school.
    11. Re:Early C history by Animats · · Score: 2
      Modula is fully capable of support systems programming: you can write OSes, drivers, whatever. In that regard, it is as powerful as C. Unlike C, it has an excellent syntax and superlative large-project structures. You haven't experienced wonderful programming until you've experienced interface modules that are kept completely seperate from the corresponding code modules.
      Having actually written the entire I/O system, all the device drivers, and a file system for a secure operating system in the original Modula I, I'm not as impressed with it. Neither was Wirth. When he spoke on Modula II, he referred to Modula I as an unsuccessful experiment.

      Modula II wasn't bad. I did a fair amount of embedded-system programming in Modula II, and it really was what you needed when you had to make a EPROM to run the program and had very limited debugging tools. Most of the time, if the program compiled, it ran properly. This is the real advantage of restrictive languages - a higher percentage of the bugs are caught at compile time.

      Modula III, the first object-oriented member of the family, never really caught on outside of DEC's old Palo Alto research operations. A free compiler is available for both NT and Linux, but it's not really maintained. Compaq has stopped all work in that area.

      Oberon is an OS and language, combined. I don't know enough about it to provide any greater detail.
      You're not missing much. Oberon's idea of a user interface is, well, painful. Again, there are free Linux and NT versions, so you can download and try it.

      One always wonders how it would have turned out if the Stanford CS department hadn't denied Wirth tenure.

    12. Re:Early C history by waterwingz · · Score: 1

      Yes - they had a damm fine C compiler. No credit to them though - they bought out a product called Wizard C. As some of us may recall, Wizard C won the Dr. Dobbs C compiler contests several years in a row.

      --
      . waterwingz
    13. Re:Early C history by costas · · Score: 2

      OK, I don't know that much about Modula, but wrt your comment, I got to say that at least Python has (reportedly) borrowed a lot from Modula-2. So, if you haven't already, take a look. Python is a programmer's and sys-admins answer to a lot of prayers...

    14. Re:Early C history by RBurbidge · · Score: 1

      Are there any BCPL programmers left? I spent several years in the mid-80's, writing embedded applications for 6502-based PCs (rack-mount BBC Microcomputers, if you can believe such a thing) using a DOS-based cross-compiler targetting a interpreted virtual machine on the 6502 (shades of Java - nothing is new!). The language is a bit odd (TEST .. THEN .. OR) but I still have a soft spot for it.

    15. Re:Early C history by Emil+Brink · · Score: 2

      Hm. You mentioned Pascal, and the entire thread is about an interview with Brian Kernighan. I think that makes this link fantastically topical. It's a paper/writeup/whatever by BWK, entitled "Why Pascal is Not My Favorite Programming Language". Being from April, 1981, it's quite dated, but it shows how to bash stuff in style. A good read. ;^)

      --
      main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
    16. Re:Early C history by RBurbidge · · Score: 1

      High tech! Our VM technology allowed in-situ execution in sideways ROMS with transparent page switching... those were the days.

  19. 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.
  20. C / C++ by rjh · · Score: 4

    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?

    1. Re:C / C++ by ameoba · · Score: 1

      Bah! You want power? Toss out your quad-Xeon system, I've got a Turing Machine here with your name on it.

      (just email me w/ the location of the dumpster)

      --
      my sig's at the bottom of the page.
  21. Re:C or C++ by jjr · · Score: 2

    What is your goal? How time do you have? Who do you have on staff? How many line of code are expected? Answer these question and you would know why you would pick C over C++ or C++ over C. Ok

  22. Re:who's the stupid one here? Oh, it's YOU! by AFCArchvile · · Score: 1

    flamebait. Go back to the old country, wherever it is, and slap the professor who taught you English grammar.

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  23. Basic and Advanced "You're" by Nemesys · · Score: 2
    1. Re:Basic and Advanced "You're" by locoluis · · Score: 1

      LOL
      Now i'm sure that even chilean students from high school can write English better than those from the U.S., at least orthographically speaking...

  24. Re:The best balance between power and expressivene by Chalst · · Score: 2
    Sure, but Common LISP doesn't compare so well with C in terms of
    leanness and predictability.

    I posted before I read Kernighan's comments about ML (nicely put, I
    guess I agree with him), and if Scheme is less an `academic' language
    than ML, you do need to grok higher-order functions to get the most
    out of it. My own guess is that in the very long term, functional
    languages will win out, but that's a long, long way off yet.

  25. Allright then, flameboy by plastik55 · · Score: 2
    I read /. for the occasional good link. Whenever I read the comments or pay close attention to the writeups, I get VERY ANGRY (like now).

    Slashdot is a good source of links, but is fundamentally content-free. Reading it like this is just as useful.

    --

    I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!

  26. Systems Research by Anonymous Coward · · Score: 1
    Has anyone read the pdf by Rob Pike mentioned in the interview ? The page is gone, but you can access it via http://linux.usc.edu/~ehovland/utah2000.pdf .

    I found it very interesting (as I was getting sick of BillG overusing the word "innovation"), but after reading it I kinda agree with him. Now who has any new open-source ideas ?

  27. Casting to a void * by rjh · · Score: 3

    Note that in the below code, the value of x is cast to a void pointer y (implicitly, not explicitly--bad programming form, but done here only to show it can be done without the compiler complaining; explicit casting can similarly be done), and y is cast back to an integer variable. This code is legal ANSI C++, and compiles under egcs-2.91 with -Wall -ansi -pedantic without error or warning.

    Production C++ code ought to use static_cast instead of these C-style casts (enhances type safety). I'm using C-style casts here for ease of reading.


    #include <iostream>
    using namespace std;

    int main(void)
    {
    int x = 123;
    void *y =
    int z = *(int *)y;
    cout << z << endl;
    }

    1. Re:Casting to a void * by Frymaster · · Score: 1
      but done here only to show it can be done without the compiler complaining

      You got that from the "what's wrong with this code?" Ad they always run in Dr. Dobbs didn't you? Damn, I hate those ads... takes me more time to read them than the rest of the magazine.

      Okay, the compiler doesn't catch it. There's no conceivable reason why you would want to construct something like this anyway (at least not to me!) I could put gasoline in my windsheild washer reservoir, the nozzle fits perfectly... but why the hell would I?

    2. Re:Casting to a void * by rjh · · Score: 2

      Okay, the compiler doesn't catch it.

      More accurately, the compiler doesn't erroneously complain about it. It's perfectly valid, syntactically correct C++.

      There's no conceivable reason you would want to construct something like this anyway

      On the contrary, it happens quite a bit. If you've got function F which calls function G, and G needs access to the internal state of F, you pass F's state to G as pointers and then cast them back to the appropriate type of variables. This is a little kludgy, but oftentimes makes for more readable code than if you'd inlined G into F.

    3. Re:Casting to a void * by Frymaster · · Score: 1
      Actually, after I posted I was reminiscing about my ill-fated forray into language parsing... lots of shuffling pointers up and down strings, lots of recursive calls on said strings....

      This is why we have handles!

  28. Re:who's the stupid one here? Oh, it's YOU! by Vuarnet · · Score: 1

    Go back to the old country, wherever it is, and slap the professor who taught you English grammar.
    Now, now... it's not fair picking on someone just because he doesn't write English as well as you'd like. It's not as if it's easy to learn proper English merely by taking a couple of courses at school! Even less when we're probably dealing with some indio bajado del cerro a tamborazos.

    However, I have to agree, he's an idiot, and as far as I'm concerned, it's open season on them all year long.

    --
    Tongue-tied and twisted, just an earth-bound misfit, I
    Learning to fly, Pink Floyd.
  29. Surely on a desert island ... by Derwen · · Score: 1
    ... you'd bury your own garbage?

    --
    http://fsfeurope.org/
    1. Re:Surely on a desert island ... by Derwen · · Score: 1
      No, I think he would eat it.
      But would C match the F-Plan diet?

      --
      http://fsfeurope.org/
  30. Funny Dilbert with Alice and a unix programmer by AFCArchvile · · Score: 3
    I remember a Dilbert with a Unix programmer, bearded, with suspenders, told a boring story about programming. At that point, Alice takes the pudgy programmer by the suspenders and says, "Look you bearded road apple, one more pointless anecdote like that and I'll snap you into next week!!!"

    The next frame takes place "sometime next week..."

    Dilbert and Wally at the copier:

    Wally: (looking at the wall) "Hey, that looks like a rift in the space-time continuum." Dilbert: "Did you just hear a snap?"
    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
    1. Re:Funny Dilbert with Alice and a unix programmer by Schwarzchild · · Score: 1
      Another funny Dilbert titled "Computer Holy Wars"

      A guy in a dress shirt with glasses approaches a scruffy looking guy: "Hey! The scruffy beard, the long suspenders, the sandals...you're one of those UNIX guys..."

      The scruffy guy in suspenders responds: "Here's a nickel kid. Go get yourself a real computer."

      hee hee hee...

      --

      "sweet dreams are made of this..."

    2. Re: Funny Dilbert with Alice and a unix programmer by Mirk · · Score: 1
      That ``Here's a nickel, kid'' strip is surely Dilbert's finest hour ... And as it happens, I have a copy of it at http://www.staff.tecc.co.uk/mi ke/eta/doc/dilbert.gif

      Disclaimer: please don't sue me.

      --

      --

      --
      What short sigs we have -
      One hundred and twenty chars!
      Too short for haiku.
  31. Re:C or C++ by Muzzarelli · · Score: 2

    My take is that only a small percentage of programmers have ever really got the oo paradigm.

  32. Re:Stuff that matters. by Anonymous Coward · · Score: 2
    1. What females would you choose, in order from my favorite downwards?

    Natilie Portman
    This chick from sales with big tits
    Miss Feburary 1974 (from playboy)

    2. Why would you choose those females?

    N.P - It is Miss Portman; I mean *duh!*
    Sales Chick - she is a hottie
    Miss 1974 - She was in the first Playboy I ever owned/found; she is a life long dream.

    3. What kind of stone (or other immobile substance, natural or manmade) would you transform them into?

    N.P - bronze
    Sales Chick - Balsa Wood
    Miss 1974 - bronze plated aluminum

    4. Describe the pose each girl would be in.

    N.P - casual stance
    Sales Chick - Sitting
    Miss 1974 - on all fours in the doggie-style position

    5. Describe the facial expression each girl would have.

    N.P. - a normail relaxed expression
    sales Chick - a bored, what-am-I-doing-here look
    Miss 1974 - a look of total extacy

    6. Explain what each girl would be wearing, if anything.

    N.P. - A mini skirt and a blouse that show-cases her tits.
    Sales Chick - Standard issue work outfit
    Miss 1974 - totally nude

    7. Explain what you would do with the girls after they were petrified.

    N.P. - Go out have have tacos. Light conversation.
    Sales Chick - I would sit her next to me in my car so I could use the HOV lane on the Dulles Toll Road and on 495.
    Miss 1974 - Hard core sex

    Thanks for your participation!

    You are welcome, I hope I helped!

  33. Demonstrably untrue. by rjh · · Score: 3

    While C++ may lose to C in the executable size, C++ has minimal loss to C when it comes to speed. The mantra of C++ is you don't pay for what you don't use, and most compilers do a pretty good job of living up to it.

    In the early days of Objective C, its performance was piss-poor due to its habitual late binding (putting off as many decisions to run-time as possible). C++ won, in part, because its early binding made for much faster code.

    If you can't write C++ code which blazes by faster than a jackrabbit on amphetamines, that's a problem with your skill, not the language.

    1. Re:Demonstrably untrue. by shippo · · Score: 2
      There is a size vs. speed trade-off, but only if there is enough memory to cope.

      I have continual problems with a C++ system I need to access remotely from work. This is spread across a number of Solaris systems, interlinked by a customer communications protocol running over TCP/IP.

      The problem is that the executables are huge. Each process, which do little more queue up transactions to a number of external systems, is at least 5MB in size. Although I don't have access to the current source code, previous revisions don't contain that much code. The processes isn't that complex, its just all the inlining that causes the problems. It is made worse by the communications library being statically linked (Arrgghh!).

      Its a constant battle freeing up resources on each of the machines, as each process starts and stops. Some days I have not been able to get much done. Not having root to any of the machines (some bozo decided to start a web server on one of them) doesn't help.

      I know this sound like a rant, but programmers and sysadmins are too different beasts, and the requirements of one (really quick code, forget the expense of memory) is not a practicality in the realm of the other.

    2. Re:Demonstrably untrue. by fnj · · Score: 1

      I don't know how many of these 5 MB processes are running in a single machine, but a 5 MB process is not what I would call huge, and I'll tell you why:

      128 MB of RAM costs not far from $128 ($1/MB). So a 5 MB process is tying up 5 bucks of memory [-spit-]. Big deal :-)

      In 1980, 5 MB of memory was a mountain. In 1990, it was a medium size mound. Today it is less than a molehill. Anthill, maybe.

    3. Re:Demonstrably untrue. by shippo · · Score: 2
      Sorry, but this attitude sucks!

      I've heard this excuse many time, concerning memory or bandwidth. Even if it is realatively cheap, it still matters. The allbeit small performance increase caused by inlining, unrolling loops et al goes out of the window as soon as the machine starts to swap heavily. Usually the process works fine when tested in isolatation, but starts to have problems when used in the real world.

      I've also experienced network systems crawling due to no-one having any idea of network bandwidth, and assuming that installing 100Mbit ethernet was the fix, as opposed to eliminating unneccessary traffic.

      Programmers and sysadmins unfortunatly have different ways of thinking.

    4. Re:Demonstrably untrue. by sql*kitten · · Score: 2
      I've also experienced network systems crawling due to no-one having any idea of network bandwidth, and assuming that installing 100Mbit ethernet was the fix, as opposed to eliminating unneccessary traffic. Programmers and sysadmins unfortunatly have different ways of thinking.

      That's not necessarily fair. The sysadmin has been handed an application to support, looked at it and said "if you want to run this application at this level of performance, you require this hardware". And the programmers would have implemented the application they were told to, without needing to think about the "big picture".

      The responsibility lies with the system architect, who from the very beginning should have calculated the usage of the application in a production setting, and made it clear in the specification exactly what was and was not required, so the programmers wouldn't waste resources, and written a business case so that the management would have invested in the infrastructure.

  34. Re:The best balance between power and expressivene by mikpos · · Score: 2

    So get a C compiler with garbage collection. Better yet, just get a li brary for it.

  35. Since nobody else mentions it. by Hanno · · Score: 2

    I'd like to note that this was a *great* interview and I'd love to see more interviews done by Mihai.

    There are so many wannbe tech journalists out there that it's good to read an interview conducted by someone who know the subject's favourite subject.

    Yes, I am aware that Brian did most of the talking. But hey, only the right questions trigger interesting answers.

    So thanks Mihai. If your career in research fails, consider making interviews with the heroes of computer science. :-)

    ------------------

    --

    ------------------
    You may like my a cappella music
  36. Re:I am glad I didn't make C++ by AuMatar · · Score: 1

    >Creating a 'high-level' language in which the >rogrammer must worry about allocating memory and leaks is a bad thing. Please. What do you want- garbage collection? Back then it would have taken more of the processor than the application. Even now its a noticeable lag. Memory leaks are a problem only if you cant program worth a damn, or your specs are totally FUBAR. >Creating a language where no one can quite determine how multiple inheritence works is a bad thing. I understand it perfectly. Class C, inherited from both A and B, has all the public/protected members of both. Not hard. >In a high level language, one should be able to implement a stack in under 8 lines. Now this is bad reasoning. Thats completely opinionated. You can't do it in C, C++, Pascal, or Java. You can do it in perl only because of the push and pop functions. Please tell me why a language needs to be able to do a stack in 8 lines, Im dying to know. >They should have left it there and gone on with lisp or ML. God no. ML? ANd have to have the output of every if statement the same on both the if andd else parts? To have to have an else? Its useless in the real world. Go back to academia.

    --
    I still have more fans than freaks. WTF is wrong with you people?
  37. You missed a couple important steps... by devphil · · Score: 2

    C was a successor to B, which was a successor to BCPL. The "B" just came from the first letter of BCPL. It was deliberately left unspecified whether the choice of "C" was the next letter in the alphabet, or the next letter in BCPL (i.e., would C's successor be "D" or "P").

    Trivia for you: the // end-of-line comments came from either BCPL or B, were removed in C, and were re-added in C++.

    There's some really cool stuff on the history of C on Dennis Ritchie's homepage. Which I can't find right now.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
    1. Re:You missed a couple important steps... by nomadic · · Score: 1

      Hey, couldn't you argue that PL(/I) was the successor to C? Or Perl?

      No?

      Fine. Never mind.
      --

    2. Re:You missed a couple important steps... by ameoba · · Score: 1

      http://www.cs.bell-labs.com/who/dmr/ index.html

      I'm a little karma-whore, short and stout...

      --
      my sig's at the bottom of the page.
  38. Functional Programming beyond Compiler Constr. by null-und-eins · · Score: 2
    I honestly don't know why the functional languages don't succeed. For instance ML, which is arguably the best combination, perhaps the one that ought to succeed: [..] I will oversimplify a lot, and probably offend my friends, by saying that the only thing people do with ML is to make ML compilers.

    A nice example of what functional languages can be used for--besides compiler construction is--the current Internatiobal Contest for Functional Programming. The task was to build a ray tracer within 72 hours. The entry of the Objective Caml team is especially impressive.

    --
    At the beginning was at.
  39. The importance of balance by devphil · · Score: 3

    I think more of the newer users of Linux should read a little more about people like this and a few other more important "personalities"

    I agree in a big way. Ever notice how the really important people, when asked about their favorite language/editor/IDE/window-manager/etc, usually answer along the lines of, "Oh, I'm comfortable with about all of them; I can switch languages as needed; I use more than one of <whatever>."

    I was re-reading a 1995 issue of IEEE-CS "Computer" magazine, and one of the articles was pointing out that bigots and advocates of a single method or a single approach or a single tool (e.g., langugage, editor, what have you) were invariably beginners and novices with little experience or useful education. Skilled programmers and designers know how to be flexible.

    The newer users of Linux, as you say, should take note of this before starting the next flame war.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  40. Try One Line by logistix · · Score: 1

    stack S;

    --
    - My password is slashdot
  41. Sorry, I thought Plain Old Text would do that righ by logistix · · Score: 1

    stack <int> S;

    --
    - My password is slashdot
  42. Re:I am glad I didn't make C++ by danni · · Score: 1
    In a high level language, one should be able to implement a stack in under 8 lines.

    What is STL?

  43. Re:The best balance between power and expressivene by pb · · Score: 1

    Yes, but Scheme doesn't look like C. Read the article again, and replace 'ML' with 'Scheme', or whatever your favorite functional language is.

    Also, remember:

    1) BWK is sympathetic to your plight.

    2) Think that perhaps one reason why he picked 'C' is that he could probably write Scheme in C if he really had to, but you could never write C in Scheme, and if you did, it'd be too slow. If you ever manage to write an optimizing C compiler in Scheme, though, hat's off to you. I'd be impressed just by the assembler... Therefore, in the long run, I think he'd be better off with his choice.

    But yeah, I kinda like Scheme too. I might try writing it in Perl sometime. ;)
    ---
    pb Reply or e-mail; don't vaguely moderate.

    --
    pb Reply or e-mail; don't vaguely moderate.
  44. Re:eqn - XML -- yes it is still in use. by Multics · · Score: 1

    Pretty much every day I still use eqn(1). It provides a clean, straight-forward, easy to remember way of describing equations. It's about 600% faster than using MS Word's whacked out equation editor.

    I'll note here that unlike TeX, Word Perfect, MathML, MS Word, WordStar or whatever other thing you've got, my eqn/tbl/troff from 1977 still formats correctly and gracefully. The only thing about my documents had that changed were SCCS became RCS.

    Those who use fads to create their documents (MS Word version XXX for example) don't plan on reusing their words which is just as stupid as not reusing code.

  45. "power" of a language by Speare · · Score: 2

    What the hell does "power" mean in a programming language, anyway? The word has no definition in a programming context.

    Let's look at the general physics definition, taken from the American Heritage dictionary.

    power: n - The rate at which work is done, expressed as the amount of work per unit time and commonly measured in units such as the watt and horsepower.

    I'd suggest that power exhibited in the programming-language context would be something like this:

    power: n - The rate at which programming work is done, expressed as the amount of programming tasks written per unit time and commonly measured in units such as statements or lines of source code.

    This is only one interpretation, mind you. Higher-level languages would thus be deemed more powerful than lower-level languages, as the source-code to machine-code ratio is more extreme. It takes fewer statements or lines of source code to express a program task in a more powerful language.

    --
    [ .sig file not found ]
    1. Re:"power" of a language by Spyky · · Score: 2

      I the point of the original posters comment was to say exactly what you just said power isn't defined in any useful way concerning programming languages.

      For example, I have to disagree with your, higher-level=more powerful definition, as well as your less-programming-time=more powerful definition. I think the ultimate power tool (besides writing out opcodes by hand) is assembler. My reasoning? You can do ANYTHING in assembler. If you can't do it there, it can't be done. Unfortunately, it sure violates your less-programming-time principle. In terms of what you can accomplish with it (it may not be easy tho') its more powerful then high-level languages.

      Spyky

  46. Re:The best balance between power and expressivene by cculianu · · Score: 2
    How old are you? 19? Are you studying cs? I bet you are a 19-year-old studying cs who just learned scheme. Every 19-year-old-learning-cs-who-just-picked-up-scheme (myself included) in the WORLD at one point or another convinces himself that scheme is the world's best computer language.

    At some point though, the novelty of it wears off and you realize you can't get anything really useful done in it and you move on to something will powerful APIs and something natively supported by your OS (such as C).

  47. Re:eqn - XML -- yes it is still in use. by tobyjaffey · · Score: 1

    You can hardly put TeX and MathML in the same category as the rest?

    MathML is a totally clean, portable way of describing equations. AFAIK it's much cleaner than eqn with it's idiosyncracies.

    Meanwhile, TeX is the choice of most mathematicians for publishing papers. It's changed very little over recent years, hardly like Word.

  48. QUICK! by Li0n · · Score: 2

    "I think that the open-source movement is in general a good thing. I am not sure that it will ever replace tailored, professional, rock-solid commercial products sold for profit."

    Where can I get that?! :P

    ---

    --

    ~
    ~
    :wq
  49. Re:C or C++ by FFFish · · Score: 2


    (A great programmer, on the other hand, uses a very high-level-language (ie. Python), and then profiles the code and rewrites the bits that really need the speed in a lower level language (ie. C/C++). The programmer thus achieves far greater productivity. The time saved can be dedicated to improving the code even more, or adding additional functionality, or performing very extended fault/bug testing, or moving onto another project.)
    <snark mode off>

    Erm. Ah, did anyone hear anything?

    Oh. I thought not. Nevermind, it must have just been my imagination. Sorry.


    --

    --

    --
    Don't like it? Respond with words, not karma.
  50. Plan 9 does not have an open-source license by Kenneth+Stephen · · Score: 2

    I know, because I recently asked this question on the OSI license discussion list. The major flaws in the Plan 9 license being that AT&T can require you to provide your private changes (ones that you havent distributed to anyone), and also revoke your ability to use the code should you file suit against AT&T.

    I only bring this up because the interview incorrectly refers to this OS as "Open-source". It isnt.

    --

    There is no such thing as luck. Luck is nothing but an absence of bad luck.

  51. MORE YANKEE IMPERIALISTS AT 11 by bobalu · · Score: 1

    I'm sorry, but you really need to address this to the guys in Congress and your own armies who need the military-industrial conspiracy to keep their careers going. Normal Americans couldn't give a flying rat's ass about South America and don't really care if their neighbor does a little coke, although at this point it's relatively passe in polite company.

    Unfortunately it'll probably be the peasants who gets killed more than anyone, and unfortunately that's probably not you. You can blame everyone else for your troubles but if you had the backbone to get rid of the corrupt dictators that run your banana republics you might have a chance at a stable democracy. And it would help, if you want anyone to take you seriously, if you could drop the macho attitude which stereotypes Latin males as hot-headed assholes. Your people really deserve better; you could help by not being such an asshole yourself.

    --
    The revolution will NOT be televised.
  52. Inspirational by cculianu · · Score: 1
    Man reading this interview I am utterly inspired by Brian Kernighan. He has seen so much stuff with his very own eyes. For god sakes, he KNOWS the guy that wrote vi!!

    God, he was at the center of everything, and still is quite in touch with the state of computer science and computing today. As cheesy as this sounds: he is my idol!!

    I am also quite in awe of the whole research environment over there at Lucent. I really wish I could get a shot at working there. I sort of guess I will be doomed to be a web programmer for ever... :(

  53. What about Java? by barracg8 · · Score: 2
    Warning: I am a Java hacker, and I like it a hell of a lot.

    Not trolling here: you are blinkering yourself it you don't see any validity in bringing Java into a conversation about C/C++.

    • People are using C++.

    Java skills are now in higher demand than C/C++ skills in the UK - taken from a recent survey of the job adverts in the IT sector over the previous year.

    • The advantage of C++ is that it's a hell of a toolbox. You've got hammers, screwdrivers, chisels and even a fully-functioning wood lathe (watch me turn this chunk of hoary code into a table leg!). Good programmers use the right tool for the job.
    As a Java programmer, I preffer the C toolbox to the C++ toolbox. The C toolbox contains all your hammers, screwdrivers, chisels, etc. The C++ toolbox contains this lot and also sticks of dynamite, nooses of rope and gattling guns. Useful, I expect, but everything ends up as the same machine code at the end of the day, and the C++ toolbox is a bit risky for some people's liking [subjective opinion].

    cheers,
    G

  54. Oberon by Dag+Hammerskjold · · Score: 1

    Good comment, although System 3 does have a window-based GUI as well as the track-viewer interface. Oberon is the bomb. If you are a real programmer and examine Oberon critically you will understand this. If there is anyone who disagrees let him post.

  55. In case you didn't know... by Anonymous Coward · · Score: 1

    ...Brian Kernighan coined the name "UNIX" as a joke in responce to Ken Thompson's stripped down MULTICS kernal that he created to play his spacewar game on an abandonded PDP-7. Maybe not a big deal, but most things don't survive without name, let alone one that piques curiosity, so maybe so.

  56. Agreed! by rjh · · Score: 2

    I didn't mention that I'm a Java hacker, because I didn't see it was particularly relevant. :)

    My general attitude on Java is "those who do not understand C++ are condemned to reinvent it, poorly" (sorry, Henry Spencer)--this is a reasoned opinion, one I've come to after some study of the issues involved; I only bring it up now to make sure that you're aware of my bias. ;)

    As a Java programmer, I [prefer] the C toolbox to the C++ toolbox. The C toolbox contains all your hammers, screwdrivers, chisels, etc. The C++ toolbox contains this lot and also sticks of dynamite, nooses of rope and [Gatling] guns.

    Wholeheartedly agreed. Anyone who tries to sell C++ (specifically, object oriented C++) as being the One True Way is probably smoking too much ganja. At the same time, though, there are occasions when you need pure, unadulterated power, and for those times, C++ exists.

    Java seems, to my mind, to almost be a subset of C++, one in which the most dangerous features of C++ have been removed--pointers, generic programming, multiple inheritance, etc. There's something to be said for this approach, in that very few C++ programmers can use multiple inheritance, generics and so on well. But those of us who can use them well get really annoyed that Java denies them to us. ;)

    My biggest objection to C++ is that it takes a very long time--on the order of years--to become a good C++ programmer. I think, though, that it's plenty worth the effort.

    As usual, most people who say "language foo is better than language bar" don't understand foo, bar, or the problem they're trying to solve in languages foo and bar. The world is filled with interesting problems to be solved. Languages are tools; and there's a lot to be said for personal preference, and comfort level, with one's tools.

    1. Re:Agreed! by Martin+S. · · Score: 1

      Java seems, to my mind, to almost be a subset of C++, one in which the most dangerous features of C++ have been removed--pointers, generic programming, multiple inheritance, etc. There's something to be said for this approach, in that very few C++ programmers can use multiple inheritance, generics and so on well. But those of us who can use them well get really annoyed that Java denies them to us. ;) There is more than 'something' to be said about the absence of multiple inheritance. No programmer can use MI well. It's a cludge of the highest order, If a programmer has to use MI, the design is wrong!

  57. I had him as a professor by dills · · Score: 5

    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".

    1. Re:I had him as a professor by Philom · · Score: 1

      > It was nice to see him bitch about people
      > being trained in Visual C++; I assume he was
      > complaining about Princeton

      Nope. Kernighan was my professor for CS 333 last semester at Princeton, and Visual C++ training is not forced upon unsuspecting students anywhere in the curriculum.

  58. Re:The best balance between power and expressivene by Maurice · · Score: 1

    Man, that's right on. Except that they taught us Dylan (I hear they do Scheme now) at my university.

  59. ...in response to... by _anomaly_ · · Score: 1
    What's even more interesting is the question that was in response to.

    M: Actually C is also my favorite programming language, and I've written a lot of programs in it, but since I began writing compilers for C, I have to confess I've begun to like it less. Some things are very hard to optimize. Can you tell us about the worse features of C, from your point of view?

    *shrug* I thought it was ironic.

    --
    "I have no special gift, I am only passionately curious." - Albert Einstein
    1. Re:...in response to... by zachg · · Score: 1

      My thoughts exactly. It looked like me, he was quick to "point a finger", rather than address the question... *shrug*

  60. Missed One, but YAY!!! by scotfree · · Score: 1

    Yay!
    I didn't think anyone with a keyboard cared about such things. Angryflower seems to have forgotten one of my favorite peeves:

    you SHOULD add an apostrophe (only) when making a possesive out of a word ending in "s":

    "The cats' bags were out on the town..."

    I see this a lot, in places like the NY Times. I place the blame on spell checkers. We've become a lazy point-click-forget race of lazy proofreaders. And curmudgeons, too!

    1. Re:Missed One, but YAY!!! by hobbit · · Score: 1

      *WRONG*

      You should add an apostrophe when making a possessive out of a plural word.

      Correct: James's house, houses' chimneys.
      Incorrect: Jesus' disciples.

      Hamish

      --
      "Wise men talk because they have something to say; fools, because they have to say something" - Plato
  61. Re:eqn - XML -- yes it is still in use. by scotfree · · Score: 1

    Meanwhile, TeX is the choice of most mathematicians for publishing papers. It's changed very little over recent years, hardly like Word.

    Yes. Still the standard, in most research circles. And Tex (LaTeX, etc) has the backwards compatibility most such tools only dream of. While the language and tools have grown over the years, they always grow 'outward', continuing to deal perfectly with existing documents - useful for those of us needing to print out decades-old preprints!

    Long live TeX!

  62. Education by sconeu · · Score: 1


    When I was at UC Santa Cruz (back in '84) there was a lot of debate among the student community about whether theoretical or more practical classes should be taught. IIRC, the board kept the theoretical emphasis, but gave a few practical classes.

    Mr. Kernighan hits the nail on the head. The theory I learned has lasted for the past 15 years. Any "practical" programming I learned was pretty much out of date. Heck, we used Pascal as the main language...

    Good for him!

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  63. Re:The best balance between power and expressivene by CoderDevo · · Score: 1

    I just took a TCL class from AjubaSolutions and wrote some of scheme in TCL while the instructor was talking.

    It cdr worked if I had more time.

  64. Re:C or C++ by NuclearArchaeologist · · Score: 1
    C with classes, or C++ was written using a C compiler, so obviously there is nothing you can do with C++ that you can not do with C. Except go home on time?

    Ohhhhh I'm up all night again. There's no substitute for brains.

  65. Re:eqn - XML -- yes it is still in use. by Multics · · Score: 2

    TeX wasn't viable in 1977. troff was. LaTeX even later. If I were starting over, perhaps I'd choose TeX. Though many of you will argue, there are people that think that Professor Knuth's vision of typeography isn't the world vision. TeX looks ok. Troff looks ok. Both could probably be better, not that most of us would recognize better if it walked up and bit us.

    MathML is way to new to know if it is going anywhere real -- eligance not withstanding (I like MathML). MS Word version 6.0 is older than MathML is and we know how viable that format is over the long-haul. Now a MathML to troff converter (I've not looked, is there one?) might be interesting in oh say another 5 years after we know if MathML is done or going to suffer from creaping featureism.

    In the end, there are markup languages and there are WYSIWYG editors. The markup languages tend to stabile longer and that makes them a much more viable candidate for words that have any hope of being reused.



    I'll note here (marginally) that if you are under 25 or 30 years old, the idea of a document being a program is probably just weird. Most big documents should be viewed as such. My books, my PhD dissertation and most of my other major documents are under revision control (RCS) and are constructed with make(1). It is neat to be able to go back and get an old paper and know that it can be reprinted reliably, it will look the same, and that I can steal pieces of it with zero trouble. Ponder doing that with a Wordstar document made on your CPM system in 1977...

    Oddly, make(1) has become the largest stability issue to going back to older documents since Berkeley and GNU keep screwing with make in a mis-guided vision of 'oh we'll make it better'. Make is a time dependency file constructor. If you want to make it something else, then call it bmake, gmake, mmake, lmake, fake or weve_lost_sight_of_makes_purpose, just leave the original make alone please.

  66. "What's not right" with Perl or Python? by ssoringg · · Score: 1

    Have you noticed the following interview question fragment:
    "Instead all sorts of ad-hoc languages pop up like Perl or Python or stuff like that. Where do you see the fault; what's not right?"

    My question is: "What's not right" with Perl or Python, but is with C? C has also not emerged from Academia, but from industry and it answered an immediate practical need, as Perl & Python had...
    The interviewer is a little bit inconsistent bashing Perl and Python using arguments that apply to C as well...

    Sorin Gherman

    1. Re:"What's not right" with Perl or Python? by Stefan+MacGeek · · Score: 1

      I don't think this question is bashing Perl or Python - I understood it more like "What is not right with academic language research that it has so little impact on practical, everyday languages?" That this argument also applies to C just reinforces the point.

      Stefan

  67. Don't forget Algol 68 by Epeeist · · Score: 1

    C, and a variety of shells, used many of the features of Algol 68. Pascal was, in many respects, Wirth's attempt to prove that you could have a smaller language than Algol 68 but still be as explressive.

  68. Re:Paranoid (Was: Using an IDE) by guran · · Score: 1
    In moderating this comment, a new category is needed: "Paranoid"

    Yes,... but is that plus or minus one?

    --

    All opinions are my own - until criticized

  69. Re:C or C++ by TheBlueJackal · · Score: 1
    No C++ is more powerful that C, simply because power is of no use if it cannot be utilised. There are a lot more powerful features and methodologies available in C++ than C and they require less work than recreating them using kludges in C *cough*GTK*cough*[1]

    "Sometimes I do write C++ instead of C. C++ I think is basically too big a language, although there's a reason for almost everything that's in it. When I write a C program of any size, I probably will wind-up using 75, 80, 90% of the language features. In other words, most of the language is useful in almost any kind of program. By contrast, if I write in C++ I probably don't use even 10% of the language, and in fact the other 90% I don't think I understand."

    One of the problems with development in *nix is the huge legacy of C, while this provides a much more gradual learning slope than C++ it also limits the power of the programmer as applications become more complex. Unfortunately most of the Major open source projects are C based and C++ APIs and documentation are a poor cousin, with less developers and therefore maturity.

    I will be glad when C++ APIs and documentation and available libraries and source reach the current levels for C. Of course I will still use C and Perl as they are often the best tool for the job - in fact I use them almost exclusively. C++ and Java though are definately essential for some jobs if you want the job done elegantly and or quickly and without horrible kludges.

    [1] GTK uses OO-like C which although quite nice to program with can sometimes be a pain the **** (not as godawful as win32 tho *shudder*), of course most *nix code is in C so its easier use it.

    --
    Perl & C Hacker :: London New Media Whore :: Pokemon Master
  70. Re:The best balance between power and expressivene by Chalst · · Score: 2
    Your guess is way off.

    I don't get the point about `powerful APIs', but you might have a
    look at the scheme2c compiler which has excellent support for linking
    C libraries into scheme code.

  71. Re:I am glad I didn't make C++ by Syllepsis · · Score: 1

    Well...I meant to implement the template, but it is a dumb debate anyway.

  72. hobby cycles by dewey · · Score: 1

    The last question in the interview dealt with hobbies, and BK said that he goes through 3-5 year cycles where he gets deeply involved in a subject, but he sort of lets it slide. I kind of do the same thing. I tell people my hobby is picking up new hobbies. Does anybody else out there do this?

  73. Re:eqn - XML -- yes it is still in use. by Chalst · · Score: 2

    One of the goals of the MathML design team is intercovertibility with TeX. Id MathML proves to be a fad, there should already *be* a converter into TeX.

  74. Re:Paranoid (Was: Using an IDE) by RickHunter · · Score: 1

    Plus, please! ^_^


    -RickHunter
  75. From "A C Man's Lament": by Novus · · Score: 1

    I don't wish to seem bitchy,
    but if only old Ritchie
    had been strangled at birth by a nurse.
    And the fate that I've planned
    for all Kernighan's clan,
    is unprintably several times worse.

    ...

    Part of an poem from an old mag. Can't remember which, though.

  76. Re:eqn - XML -- yes it is still in use. by tobyjaffey · · Score: 1

    I'll note here (marginally) that if you are under 25 or 30 years old, the idea of a document being a program is probably just weird.

    I'm 20 and fairly used to documents containing active code. But, what really puzzles me is why the ascii manpage isn't generated on the fly?

    Although embedded code in documents can be very cool (ie postscript), I really do prefer some division of code and layout. Hence, I have a really nice Java FAQ written in SGML, using make it's automagically rendered and contorted into LaTeX, pdf, ps, plain text and HTML. It's really nice to have a single source format without any embedded code, that way it can be easily reused.
  77. Not entirely convinced by this ... by mikeb · · Score: 1

    I have to disagree with some of this ... absolutely true that BCPL was a pretty nasty language, and it was without doubt the ancestor of C, which cleaned it up nicely. I rember picking up a copy of it from Colin Whitby-Strevens at Warwick University in 1977. Anyone remember the DEC RK05 disk? BCPL was not much fun, though its expression orientedness was intriguing.

    During the 70s Pascal became a popular programming language in *some* academic circles, but the systems-oriented people latched onto Unix and C pretty quickly. Wirth himself admitted that he disigned Pascal as a teaching language rather than a programming language and it really showed. C on the other hand, was written by people who knew operating systems - although it was Ritchie's work, it was written so that the early Unix kernel, previously written in assembler mostly by Thompson, could be written in a high level language instead. Having a real task to do, not just demonstrate language features, it *had* to be useful and effective from a systems programmer's point of view. I agree with Kernighan - it's still a very good small language.

    It is VERY worth while to dig up a copy of Kernighan's critique of Pascal "Why Pascal is not my favourite programming language", written circa 1982 if memory serves me well.

    It's long been my belief that the real reason for the success of C was the emergence of the IBM PC in the early 80s. It was essential on those things at the time to talk directly to the video card, hook interrupts and so on - just the sort of stuff that was near-impossible in Pascal and almost trivial in C. Good quality C compilers rapidly became available and since C code could be made largely portable between Unix and the IBM PC, thanks to the stdio library, C became the 'language of choice' for serious systems developers. What strangled Pascal was the lack of separate compilation and poor support in terms of libraries, whilst C's libraries grew and grew.

    At the end of the day, C was fit for purpose (as was Pascal, but its purpose was very limited) - and since what most people wanted to do was what C let them do, it won hands-down. Pascal could only be used on single-person projects. C allowed a team to work. No contest.

    From a personal perspective, Pascal was also unpleasant to use. Its bondage-and-domination type system was fine for undergraduates who needed a safety-rope, but if you needed to close to the metal it just got in your way at every step. No initialised data - everything done in assignments ... aaagh. Kernighan's paper says it all!

    Mike

    1. Re:Not entirely convinced by this ... by GregWebb · · Score: 2

      Interesting :)

      I actually much prefer coding in Pascal to C. Partly as I find Pascal a very clear syntax whereas even C fans will admit it can look like line noise. Not as bad as Perl but still... Partly, too, that because it's very picky, it's very easy to bugfix. The compiler will catch so many little gotchas which would cause something weird to happen with a C program, as the problem doesn't show up until later... Example: in Pascal, if I try and write past the end of an array it crashes. I can find that _very_ easily by stepping through the code. Do the same in C and it'll normally corrupt the memory. Now, which is easier to track down and sort out?

      I've often thought that C's success is at least partially cultural. I remember when I was first getting into Amigas, everything had to be hand-coded in assembler (or so it sometimes looked, anyway) or you weren't a real coder. Now, C is (in many ways) a platform-independent assembly language. Yes, it's higher level, but there's still a fair bit in common. Anyway. The point is that coding in C there was still enough metal-bashing to make the coder look like a real man. Pascal, OTOH, is just too easy.

      If you're writing an OS or a driver or something else at that sort of level, C makes sense in many ways while Pascal (or most Pascal-derived languages) would have clear limitations. If I'm writing a normal user-space application, though - such as a web browser, considering where this message is being posted - IMO you just don't need the level of control C gives you. If you don't need the control, why should you pay the cost of having the little gotchas to catch? I've just got better things to do with my time, and appreciate the easier debugging. The apps users would, too - same debugging effort produces better quality. What more could you want? ;)

      --

      Greg

      (Inside a nuclear plant)
      Aaaarrrggh! Run! The canary has mutated!

  78. Re:I was thinking about that after I posted! by AFCArchvile · · Score: 1

    Both are in the Dilbert compilation: "Casual Day Has Gone Too Far." I think it's a must have for slashdotters (well, at least the Computer Holy Wars section).

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  79. Clear as mud by Morgaine · · Score: 2

    But the Ocaml guys won't win: they've used comments quite blatently on at least a couple of lines, and as soon as the functional community notices, they'll be excommunicated and ostracized for life.

    Just imagine what would happen if it caught on and comments in functional programs became commonplace. People would actually be able to figure out what functions were intended to do, and decades of good work would go down the drain. Heaven forbid!

    But it gets worse: this team has even used descriptive identifiers in a couple of places. Shock horror, whatever next -- code walkthroughs?!

    [PS. This comment may actually be a half-serious answer to the question of why FP has never had an impact outside of academia. Apparently FP programmers don't consider that the "software crisis" and maintainability have any relevance to them.]

    [PPS. I like ML. Languages aren't obscure, only programmers.]

    --
    "The question of whether machines can think is no more interesting than [] whether submarines can swim" - Dijkstra
  80. Re:The best balance between power and expressivene by cculianu · · Score: 1

    Well, you may be right.. people in academics and research really think that languages like scheme and ml are underused despite their power and expressiveness. Take a look at the kernighan interview: http://www.cs.cmu.edu/ ~mihaib/kernighan-interview/index.html

  81. (equal? mainstream C-like) ==> #f by brlewis · · Score: 1
    Do mainstream people really "think" c + a*sin(b*c) - d? I think most people see such formulas as weird in either notation. The prefix notation is easier if you read it like this: (difference (sum c (product a (sin (product b c))) d) i.e. using words that English normally uses in prefix notation.

    I don't see how (begin is less clear than {, or (vector-ref a n) inherently less clear than a[n]. Having everything in the language be of the form (verb object ...) is a lot like English.

    You'll have to elaborate on your criticism of dynamic typing. AFAIK its only downside is performance, assuming you don't have a compiler that infers types.

    A variant of Scheme is already my language of choice for database-driven web apps. The language is as simple or difficult as whatever it is you're trying to do.