Slashdot Mirror


How Heraclitus would Design a Programming Language

CowboyRobot writes "Developer of Smalltalk Alan Kay has an interview on ACM Queue where he describes the history of computing and his approach to designing languages. Kay has an impressive resume (PARC, ARPAnet, Atari, Apple, Alan Turing Award winner) and has an endless supply of memorable quotes: 'Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term,' 'Once you have something that grows faster than education grows, you're always going to get a pop culture,' 'most undergraduate degrees in computer science these days are basically Java vocational training,' 'All creativity is an extended form of a joke,' and 'nobody really knows how to design a good language.'"

20 of 577 comments (clear)

  1. Misleading headline by Pan+T.+Hose · · Score: 5, Interesting

    Notwithstanding the grammar mistake--I hope editors will have corrected it before I finish writing this comment--it is not "How [Would] Heraclitus ... Design a Programming Language" but rather "What Programming Language Would Heraclitus Design." On the other hand if you are wondering how should you desing and implement a programming language, I would suggest targetting Parrot which makes implementing compilers 1000 times easier than ever before, not to even mention future interoperability and e.g. access to the entire CPAN from the level of your own brand new language, effectively solving the most important problem of new languages: there are no libraries so people don't write anything, and people don't write anything so there are no libraries. Good luck.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  2. Hey, I like Perl! by gweihir · · Score: 5, Interesting

    Perl is a very powerful language to write small tools in the UNIX philosophy. It works very well. It requires some level of competence in the user, but so does every advanced tool. And it is not a general-purpose language.

    Frankly, without Perl my work would be far harder.

    I also like Eiffel. Guess I am one of those scary people that actually use different tools for different tasks and do not spam the world with simplistic, general and irrelevant statements. about

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:Hey, I like Perl! by hattig · · Score: 2, Interesting

      I wouldn't want to write Office in Perl, but yes, Perl is an excellent scripting language made extrememly useful by all the modules available for it.

      Would you spend ages writing a text parser in Java to get some text formatted data into a database, or would you do it in an hour in Perl? Especially if you are working on a remote system, any unix system is pretty much guaranteed to have Perl installed.

      It is all about choosing the best language for the task. If I was writing mobile phone games, I'd use Java because most modern phones have Java. If I was writing a Windows application for general release, I'd use C/C++/C#. In-house GUI application - Java because it is quick, easy and maintainable, and hopefully would run on any Unix systems too.

      There is an advantage to using a popular language - if you have a problem, it is far more likely you'll find a solution online.

      Also, you are restricted by the languages you know and project timescales. Java might not be ideal, but lots of people know it and it may not be perfect, but it works for lots of tasks. Likewise I know Perl, but maybe you know Ruby or Python and can do stuff in those instead. Oh, and knowing a language isn't about knowing the language structure, it is about knowing the APIs with it, which is the time consuming task.

      Oh, and maybe American universities might be churning out Java programmers from their Computer Science courses, but that wasn't what I experienced in the UK. Okay, it was Cambridge, but Java was 1 course out of dozens, and we also did ML and Modula3 (although that has now been dropped and replaced by another Java course, I was on the crossover year I think). The C course was a 6 lecture course of where you could fuck up with C, they assumed you would learn C yourself.

    2. Re:Hey, I like Perl! by geoffspear · · Score: 2, Interesting
      Umm, that's his point. People use it as a general purpose language because they can. It started off as something useful for writing small tools, then got extended so you can do just about anything with it, without really being designed from the outset to be like that.

      If you're using it as a much more powerful replacement to sed, it's a great tool. If you're using it to replace C to develop complex application, you're proving Mr. Kay's point.

      --
      Don't blame me; I'm never given mod points.
  3. Illuminatus! by Tackhead · · Score: 3, Interesting
    ...it develops that Alan Kay is an agent of the Underground, which is called Dobbs' Lightning because of Heraclitus' idea that Dobbs first manifested Himself as a lightning bolt which created the world.

    It was in Dobbs' Lightning that I first read Tux Sneezed, which I still think is a rip-roaring good yarn. The scene where Atlanta Hope sees Niklaus Wirth and it's her old *ahem* "boyfriend" with the gaunt cheeks, and he said "I am Bob Dobbs", man, that's writing. The 103-page long speech afterwards, explaining the importance of strong typing and showing why all the anti-Heracletians are destroying civilization by destroying strong typing, certainly is persuasive, especially to me who's got three (going on four) contracts, each of which share the same include files. "Without strong typing there can be no civilization."

    Her nonfiction book, "Antitrust: The Unknown Ideal for the New Heracletian" is, I think, a distinct letdown, but the Dobbs' Lightning bumper stickers sure give people the creeps.

    I met Atlanta Hope at the time of the IEEE Committee Riots. I was in the thick of it (you have no idea how bizarre civil war gets when one side uses nerf weapons as a large part of its arsenal), and met Atlanta herself where the last stand was being made. She grabbed my right arm and howled something like "War is the Health of the State! Conflict is the creator of all things!"

    Seeing as how she was on a heavy Heraclitus wavelength, I quoted with great passion, "Men should fight for the Laws as they would for the walls of the city!" That won her, and I was Atlanta's personal lieutenant for the rest of the battle.

    (Epilogue: Heraclitus -- He was apt to say odd things. Once he even wrote that "Religious ceremonies are unholy." A strange duck.)

  4. language developers disconnected from reality by jeif1k · · Score: 5, Interesting

    I'd disagree that there aren't people who can design decent languages. The problem is that they can't market them,

    No, the problem is that the people who know a lot about languages know little about application domains, and the people who know a lot about application domains know little about how to design languages (or at least don't spend much time on it).

    That's why languages like MATLAB dominate scientific computing and languages like Perl, PHP, and Java dominate web computing, and why languages like CAML, Haskell, Lisp, and Smalltalk have never ended up being good general purpose languages.

    The problem isn't language designers its us developers, we don't want to spend a week learning a new syntax for a loop, we want to use what we used before. In other words we are luddites.

    Programmers contribute to the problem. But while many people have syntactic hangups, even more of them just "don't get" a different approach to programming at all.

    1. Re:language developers disconnected from reality by MosesJones · · Score: 5, Interesting

      No, the problem is that the people who know a lot about languages know little about application domains, and the people who know a lot about application domains know little about how to design languages (or at least don't spend much time on it).

      I have to disagree here, the team that designed Ada for instance REALLY understood about application domains and the challenges of developing languages, and the people judging the competition to design Ada DEFINATELY understood the challenges of languages. The problem was that it wasn't "cool" like C, and they didn't focus on providing elements like DB connectivity or GUI frameworks as standard (understandable in the 1980s).

      I've worked on projects with Ada, and as a language it was superb. Same with Eiffel. The biggest problem that I had managing those teams were the malcontents who complained that writing

      "foreach n in X loop"

      with an "end loop;" at the end. This was FAR too much work apparently and coding would be much quicker writing

      "for(x = 0; x y; x++)"

      In the end around 20% of the code was written in C, and 80% in Ada. 95% of our bugs were in the C code.

      Keeps us in jobs though I guess, if we used better languages we wouldn't have to spend so much time fixing things.

      --
      An Eye for an Eye will make the whole world blind - Gandhi
    2. Re:language developers disconnected from reality by Anonymous Coward · · Score: 1, Interesting
      Any benefits of C's for loop construct are entirely coincidental; it has the form it has solely because it's trivial to translate to machine code.
      for (initialisation, condition, increment) {
      body
      }
      just becomes
      initialisation
      .LOOP
      CMP condition
      BZ .END
      body
      increment
      JMP .LOOP
      .END
      As for convenience when iterating over a linked list - I have to say, personally I think
      for each x in container {
      use x
      }
      is considerably easier to read than
      for (x = container; x != NULL; x = x->next) {
      use *x
      }
  5. Re:No decent langauges... by plague3106 · · Score: 3, Interesting

    I'm not a luddite, I just don't feel like typing an essay to make the computer do something simple.

    I used Eiffel in college, and didn't it find it to be all that great. To make your compiled program run at a decent speed, you had to 'freeze' it (melting IIRC was the quick & dirty no opimization compile) which would take hours. Hours if find if you are compling a huge project (say a kernel) but for a simple graphical poker game..ugh.

    I know terminology is probably something that held it back...freeze, pebbles, etc.

    It was wordy and too strict style-wise. Why the hell should i have to type a : when doing an assignment? From ... until ... loop ... end? Why do I need all that just to specify a loop? Why is for( init ; condition ; increment ){ } harder?

    Having to type all that extra stuff does add up, and while typing isn't the largest task, when it does finally come time to code, I don't wnat to spend my day writing extra, unnessary crap to make the program work.

    Please explain why C# or Java is rubbish compared to Eiffel? I'm all for learning a new syntax if it buys you something new...but Eiffel's syntax doesn't, I just takes more typing and requires you to remember even more keywords.

  6. Fascinating by chaoticset · · Score: 2, Interesting
    Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term.

    Ah, like English. Or, for that matter, everything else ever invented or discovered, accidentally or otherwise. Fire burns down houses. Wheels are attached to cars that run people over and pollute the environment. Light bulbs enable light pollution.

    The quote is another example of stating something obvious in a way that seems profound.
    --

    -----------------------
    You are what you think.
  7. Re:The Java vocational training quote rings true by otis+wildflower · · Score: 2, Interesting

    Undergraduate courses are not the place for vocational training no matter how good the stats look for the government.

    OK then, what is?

    The US doesn't have a German-style 'meister' crafts system for coding or other IT functions. BA in CS is as close as it gets, or you could go for an EE degree to swap Sun FRUs and be completely stupid overkill.

    You have a point in that undergrads are not the place for vocational training, but my response is that we really don't have any current workable alternative that has the interview-respect of a guild-style system or a meister system.

    If your goal is to build CS into a taller ivory tower, fine, but not until there's a legitimate alternative that can give people, say, two years of all the theory that's going to be used in the real world today and a couple years of practicum (building infrastructure, doing documentation, coding, internship) that will garner some form of vocational accreditation that people will accept.

    Frankly, for most of the work I do (sysadmin hardware/software, networks, etc) I would rather have someone who had 2 years in CS foundations and 2+ years doing labs with 'standard' stuff like Solaris, Linux, VxVM/VCS, EMC gear, etc. from a legit institution than a newly-minted BSCS or BSEE.

  8. Re:No decent langauges... by |<amikaze · · Score: 2, Interesting


    I used a fair bit of Eiffel last semester, and love the language. I do have a theory as to why it hasn't gotten a more mainstream acceptance than a lot of other languages though: ESTUDIO. That is one of the most painful IDEs I have ever used. I can't even think of what else to say... EStudio was one of the largest barriers for me doing my assignments, because there was numerous times I felt it was actually working against me.

  9. Re: memorable quotes ? by Sique · · Score: 4, Interesting

    You don't understand what his criticism for Perl is all about. You'll understand it once you try to implement Perl in Perl (as an exercise you could start to implement the Perl RegExp in Perl without using Perl RegExp).

    (Non-ANSI, but original) Lisp is a language that is implemented in itself in about half a letter page.

    Even Smalltalk can be implemented in Smalltalk in a quite compact manner.

    Perl needs a quite large compiler to turn Perl code into the runtime code. And every new feature in Perl is done in a way, that the compiler has to be changed and a formerly syntactically wrong line gets a semantic put on.

    Perl is fine for what it was thought out for: To crunch large amounts of similarily structured data into human readable reports. That's what most CGIs or admin scripts are about: filtering database entries or long logfiles and converting the results into webpages or other human accessible documents.
    (Or getting huge amounts of data and turning them into log file entries and data base lines.)

    It is still a Practical Extraction and Report Language. Alan Kay didn't dispute it. But it gets most of it's power as a language from what Alan Kay has called "an egyptian pyramid", a huge number of bricks and buildingblocks put together by brute force and thousands of slaves, but not from its inherent design qualities.

    --
    .sig: Sique *sigh*
  10. Re:The Java vocational training quote rings true by nagora · · Score: 3, Interesting
    Let's face it, a CS grad would come out of a good program looking to build stuff in all her favorite languages and paradigms, but lo and behold, there's legacy code, greybeards who swear by C, managers demanding that you code to standards so new hires can read your stuff.... All the things that didn't matter really back in the academy but are cruelly part of computing in private industry.

    But that's not a "good" program, that's a bad one. A good program would teach algorithms, design, and team working and at least three languages, one of which should be Lisp, just because it lets them know there are other paradigms out there. That will teach flexibility and allow students to cope with legacy and oddball systems. Learning Java is simply not good enough. Indeed, I would say that learning C and Smalltalk would give anyone the tools to walk into a Java post with a week's notice, and many other posts too.

    Get them all doing assembler, that what I say. Assemble some sense into 'em!

    TWW

    --
    "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
  11. Clarification by ggvaidya · · Score: 3, Interesting

    Well, I was trying to be funny, but obviously it didn't come off too well. But shush, don't tell anyone: I really love the ubercomplex discussions going on.

  12. Re:The Java vocational training quote rings true by The+Desert+Palooka · · Score: 2, Interesting

    Frankly, for most of the work I do (sysadmin hardware/software, networks, etc) I would rather have someone who had 2 years in CS foundations and 2+ years doing labs with 'standard' stuff like Solaris, Linux, VxVM/VCS, EMC gear, etc. from a legit institution than a newly-minted BSCS or BSEE.

    Actually there's programs that address this need now. At the institution I'm at it's called "Computer Technology" and it focuses on application, and existing and emerging technologies. It's lighter on math, lighter on theory, and heavy on applications and administration. Truthfully it could be replaced by a mentoring program, or just some good work experience.

    The CS program on the other hand, is pretty much the opposite... It's more science heavy, and math heavy (two classes from a minor in math), and less about applications (though you can use those as electives... well, a few, most don't count for credit in CS).

    It's interesting to see all these vocational style programs popping up in academia... But I'm fearing that there's starting to be misconceptions about what a degree means and what a university education means... Personally I never thought it meant being taught Visio or Dreamweaver MX 2004.

    I hope that we can have an Apprentence, Journeyman, Master type thing for more grunt-like work where the why doesn't matter in the near future... But while we don't have that I hope that we don't destroy our research and academic infastructure in CS trying to accomodate a lack of good job training, or just a lack of good Techology Associate Degree programs.

  13. Re:I got your perl right here. by The+Unabageler · · Score: 2, Interesting
    some real perl poetry:
    # If you awake and see the sunrise
    # bathing earth in red and gold,
    # As you gaze you'll somehow find
    # it brings a washing of the soul.
    #!/usr/bin/perl

    if (sleep(1) and @earth =($sunrise{red},$sunrise{gold})) {
    @soul = map {&wash(\@soul,$_)} (keys %sunrise,@earth);
    }
    and while not a poem in the strict sense, you do get a good rythm going when reading this next one. It's inspired by watching someone fail miserably at parallel parking.
    #!/usr/bin/perl
    sub out(@){join"",@_}sub in($;){pop}$/=in out
    *,="Just another Perl hacker";open IN,$0;$OUT
    =in <IN>;$|=1&& $OUT=~/((OUT)?.(.). IN.+)/is;
    @_=out qw|R 5 V : C % & : @ P F < E ! % ( R 5
    & : T ] F ; A ! " = S 5 G 2 8|; for $ward( in
    reverse@_){push@for,$ward,in reverse}print in
    unpack out($3), in out reverse in out reverse
    in out reverse out @for,$ward, reverse; close
    IN and kill 9,in $$ or eval in out in out $1;
    --
    perl -e '$_="\007/4`\cp%2,".chr(127);s/./"\"\\c$&\""/gees; print'
  14. Re:On the contrary by sconeu · · Score: 2, Interesting

    At UC Santa Cruz, we went through this back in the early '80s (83-84). In fact, the students even organized to protest the theory-based curriculum. (OT: Any old CISSA members out there?)

    Of course, we wanted courses in VAX Assembler and C. When I got out into the real world, it turned out that the theory that I had learned was of much more practical use than the so-called "practical" classes I took -- with the exception of C, which I learned on my own.

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  15. Too bad by mattr · · Score: 2, Interesting

    I really liked the end of the interview and copied it to read again a few times. But felt a bit disappointed in that Kay is boosting Squeak and Lisp, dissing Perl, and yet seems to promote many ideas that are becoming mantra by perl people.

    Given that the interior of Perl is (at least used to, I don't know about now or Parrot) ugly, scary stuff, I would have liked to hear Kay's take on what Larry Wall and some other pretty bright people are trying to do with perl and parrot now, and whether he thinks their philosophies are great or slumbering. Might be a flame war to end all flame wars, but relatively untutored (well Niklaus Wirth's book was my beginning at a young age and according to Kay I've probably been damaged by it) I was excited to see all the ideas that were being stolen and discussed from other languages for Perl 6. Late typing, rebuilding the language from inside at a "meta" level, these all sound great. I'm also interested time and again with Haskell and perhaps it is because I subconsciously have an urge for cleanliness like the 1/2 page of Lisp.

    Would parrot written in Lisp be better? I've liked Perl and the libraries of course, but if I could do without them I wonder if Kay would recommend Squeak, something like Erlang (?), or what. The talk of the ancient computer that had 1000 times better "lost" technology than today was intriguing but there was too little about it, and it seemed to talk almost about the Cell processor there.

    I feel a great amount of warmth and wisdom from Kay and it is probably too much to ask him to light the way, but if he is going to go shooting down most of the world, even people who are seriously wanting something better and trying to build it, I think he has some responsibility to address it, or at least to mention how Squeak can solve all our problems. Well I guess I have a week of surfing to find my own answers. When I looked at Squeak the last couple of times a while ago I had to turn away from it (down the dark path?) but at the very least I'd like to be intelligent about my choices.

    To me perl and the people at perlmonks.org are interested in a language that assists creativity and the wild Larry juggernaught and the wizards involved in Perl 6 deserve more than Kay handed out. I hope this is not his last parting shot but the first of many challenging, wonderful discussions by Kay about how we can get to the next level.

  16. Re:What 60s GUIs is he talking about? by pHDNgell · · Score: 2, Interesting

    OK, I'll bite. I don't remember any GUIs in the 60s... what were they?

    check wikipedia (and update it if you find anything else)

    --
    -- The world is watching America, and America is watching TV.