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

21 of 577 comments (clear)

  1. Which fanboy are you? by Anonymous Coward · · Score: 5, Funny
    Which fanboy are you?
    1. Windows

      You wear wraparound sunglasses, even indoors. You wish your mother would let you ride a motorbike. You tell your friends you're pulling in $50,000 a year and $2,000 a month "playing the stock market" but in reality you're only bringing in half that and your dividends from MSFT havn't been good in years. Your non computing friends all turn to you for help; you only charge $30 an hour. Your collegues talk about you behind your back. Your workplace nickname is likely to be "The Asshole". Unlike the Linux fanboys, you actually try to pick up dates in bars but women laugh at you.
    2. Apple

      ou think you're so cool you hurt. You have mirrors on every wall in your "loft apartment", which is really a grimy little apartment next to a guy who plays Guns 'n Roses at 3am. All of your furniture is from Ikea. You sometimes think that changing your name to "Steve" would be "pretty cool". When you go to bars you only drink Miller Lite. No body ever asks you for help with their computers because they know you don't know anything but OS X, even if you do tell them you "run Unix" now. Your friends openly laugh at you.
    3. Linspire

      You regularly give $10 bills to homeless guys because you have too much money. Computers baffle you, but you enjoy looking at pictures of naked women. You don't know what Linux is, but you continually bugged the IT guy at work about your computer he installed Linspire on your machine.
    4. Umbongo

      You shop at GAP. You probably used to use a Mac. When you saw the multiracial image used as a desktop picture and heard that this operating system came from the same country as Nelson Mandella, you knew it was for you. You meet with your friends in fair-trade coffee houses and talk about the eventual overthrow of evil corporations such as Microsoft and Starbucks. Like the Linspire user, you have very little real knowlege when it comes to computers but you would never use your computer to look at pictures of women degrading themselves.
    5. Gentoy

      You've been "into computers" for ohh, one or two years now and fancy yourself as "a bit of a hacker". Wouldn't know C from C++, or even Perl for that matter. Older Gentoy users may be building their homes from matchsticks. You've explained to all your friends that your matchstick house will have an "optimised floorplan". They've tried to tell you that your house violates every known building code and law in your area, but you've ignored them so far because you can't read those complicated regulatory documents.
    6. Linux From Scratch

      Much like the Gentoy user but you'd also be into sadomasochistic sex if you could get it. You're not just building a house from matchsticks, you're planing to grow the trees to make the matchsticks. You've cleared some land but don't know what to do next because you havn't read the books you've got, so you've posted to alt.arborists.newbie asking for help. It's been three days so far and no one has replied. You remain hopeful.
    1. Re:Which fanboy are you? by essreenim · · Score: 4, Funny
      8. GNU HERD

      You don't really exist in the conventional sense. You are more an abstraction. So too is your operating system. Your imaginery friends call you all the time to arrange getting together to add on more features to your imaginery OS. You will always buy the fair trade bar of chocolate for $5 before the bag of smarties @ $0.50 but thats ok, because although the cost to your productivity by using HERD now runs into the tens of thousands, that is more than made up for by the imaginery dent you are doing to the Microsoft corrporation. You could be from anywhere but you might well be German and as you know very well, its dangerous to purchase proprietary software but it's ok to stone someone else to death for using it!

      : )

  2. Not C++ I hope by Anonymous Coward · · Score: 4, Funny

    Hello Gentlemen,

    I'm a first year programming student at an Ivy League school and I've
    just finished my Visual Basic classes. This term I'll be moving onto
    C++. However I've noticed some issues with C++ that I'd like to
    discuss with the rest of the programming community. Please do not
    think of me as being technically ignorant. In addition to VB, I am
    very skilled at HTML programming, one of the most challenging
    languages out there!

    C++ is based on a concept known as Object Oriented Programming. In
    this style of programming (also known as OOPS in the coding community)
    a programmer builds "objects" or "glasses" out of his code, and then
    manipulates these "glasses". Since I'm assuming that you, dear reader,
    are as skilled at programming as I am, I'll skip further explanation
    of these "glasses".

    Please allow me to make a brief aside here and discuss the origins C++
    for a moment. My research shows that this language is one of the
    oldest languages in existence, pre-dating even assembly! It was
    created in the early 70s when AT&T began looking for a new language to
    write BSD, its Unix Operation System (later on, other companies would
    "borrow" the BSD source code to build both Solaris and Linux!)
    Interestingly, the name C++ is a pun by the creator of the language.
    When the first beta was released, it was remarked that the language
    would be graded as a C+, because of how hideously complex and unwieldy
    it was. The extra plus was tacked on during a later release when some
    of these issues were fixed. The language would still be graded a C,
    but it was the highest C possible! Truly a clever name for this
    language.

    Back to the topic on hand, I feel that C++ - despite its flaws - has
    been a very valuable tool to the world of computers. Unfortunately
    its starting to show its age, and I feel that it should be
    retired, as COBOL, ADA and Smalltalk seem to have been. Recently I've
    become acquainted with another language that's quite recently been
    developed. Its one that promises to greatly simplify programming. This
    new language is called C.

    Although syntactically borrowing a great deal from its predecessor
    C++, C greatly simplifies things (thus its name, which hints at its
    simpler nature by striping off the clunky double-pluses.) Its biggest
    strength is that it abandons an OOPS-style of programming. No more
    awkward "objects" or "glasses". Instead C uses what are called
    structs. Vaguely similar to a C++ "glass", a struct does away with
    anachronisms like inheritance, namespaces and the whole
    private/public/protected/friend access issues of its variables and
    routines. By freeing the programmer from the requirement to juggle all
    these issues, the coder can focus on implementing his algorithm and
    rapidly developing his application.

    While C lacks the speed and robustness of C++, I think these are petty
    issues. Given the speed of modern computers, the relative sluggishness
    of C shouldn't be an issue. Robustness and stability will occur as C
    becomes more pervasive amongst the programming community and it
    becomes more fine-tuned. Eventually C should have stability rivaling
    that of C++.

    I'm hoping to see C adopted as the de facto standard of programming.
    Based on what I've learned of this language, the future seems very
    bright indeed for C! Eventually, many years from now, perhaps we'll
    even see an operating system coded in this language.

    Thank you for your time. Your feedback is greatly appreciated.

  3. 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."
  4. No decent langauges... by MosesJones · · Score: 5, Insightful


    I'd disagree that there aren't people who can design decent languages. The problem is that they can't market them, and that developers continue to go back to the brain-dead syntax of C as if looking like C was an aspiration for a language.

    Languages like Ada, Eiffel etc (which yes I have used commercially) are brilliant from a language perspective, especially for large projects. The trouble is developers would prefer to write something in 5 characters than 30 characters in a mistaken belief that they are being more productive and that typing is the longest task they undertake.

    When you get into more "esoteric" areas like goal driven programming or agents then the languages become better, because the people using them are more aware of the purpose of the language and aren't constrained by a belief that it has to look like C.

    C# and Java are great example of languages that took on that syntax and many of the constructs as its easier to get a language accepted when it looks like C than when a developer has to learn a new syntax that will in the long run be better.

    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.

    Smalltalk was okay, but I prefered Eiffel, Java and C# are both by comparison rubbish, but they have better GUI libraries and marketing departments.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  5. 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.
  6. I got your perl right here. by zerocool^ · · Score: 5, Funny
    Ah, perl poetry.
    < >!*''#
    ^"`$$-
    !*=@$_
    %*<> ~#4
    &[]../
    |{!,,SYSTEM HALTED
    or,

    Waka waka bang star tick tick hash,
    Caret quote back-tick dollar dollar dash,
    Bang star equal at dollar under-score,
    Percent star waka waka tilde number four,
    Ampersand bracket bracket dot dot slash,
    Pipes curly-bracket bang comma comma CRASH.

    Also: Isn't it odd that perl is the one language that hardly ever makes it past the slashdot lameness filter?

    ~Wx
    --
    sig?
  7. astounding hubris by jeif1k · · Score: 5, Insightful

    I would suggest targetting Parrot [slashdot.org] which makes implementing compilers 1000 times easier than ever before,

    In light of more than half a century of dynamic language history, that's just astounding hubris. By comparison with systems like Lisp and Dylan, for example, the Parrot system is still enormously complex, limited, and cumbersome from the programmer's point of view. And compared to Smalltalk, Perl/Parrot isn't even in the same league when it comes to programming environments, browsers, and other tools (in fact, very little really is).

    Kay's example of Perl as a language that reinvents the wheel poorly is as appropriate today with Parrot as it was for earlier versions of Perl. The fact that Perl is useful in practice (I use it all the time) because it has lots of libraries and ports doesn't change the fact that its foundations are poorly thought out.

  8. Perl by The+Famous+Brett+Wat · · Score: 4, Insightful
    I like languages mostly for the way they challenge my established thinking on programming. Smalltalk wasn't that much of a challenge to me, because I learned it fairly late in the overall scheme of things, and had already learned some of its concepts from other, more recent languages. Eiffel taught me the joys of assertions and programming by contract, as well as the joys and limitations of the OO inheritance model. Haskell was fascinating for its lazy evaluation, and the possibility of infinite lists.

    But Perl! Ah, Perl! Such a bundle of contradictions! It violated every rule I held dear about language theory, and was a better language for it. Perl doesn't try to be a theoretically perfect language for any particular theory of linguistic perfection. It has principles, but it is not a slave to those principles. It has a degree of consistency, but never a foolish consistency.

    No language on Earth has made me rethink my concepts of "what makes a good language" more than Perl.

    --
    proof, n. A demonstration that a conclusion is implied by certain premises and axioms.
  9. Lisp by Anonymous Coward · · Score: 4, Insightful

    I kindof get the impression Kay hasn't looked at modern lisp as much as historic lisp - for starters, lisp has had structured data for, well, decades (no, lisp doesn't just do symbols and lists, okay?), and while us lispers applying lessons from compsci type theory piecemeal to practical lisp drives the static-typing bigots/purists into insane flamewars, the existence-proof of the applicability of such lessons that availability of type-inferencing lisp compilers such as CMUCL and SBCL shows that Kay's comments about lisp and types are again, while not exactly wrong, are mostly applicable to the lisp of yore (and with, lisp, we're really talking _yore_, compared to almost any still-used language around today except FORTRAN), not ANSI Common Lisp.

    So I don't particularly like his pigoenholing of lisp - he says there were three working extensible languages, and smalltalk was one of them, kindof not mentioning however, that lisp _wrote the book_ on extensible languages. Every good lisp program extends the vocabulary of the lisp language into the problem domain (a characteristic shared with good Forth).

    I confidently predict something vaguely recognisable as "Lisp" will outlast pretty much every other computer language on the planet. You see, new dynamic languages have a choice when they get to a certain point (a choice e.g. python is now facing) - do they add the remaining features of lisp and thereby "risk" being classed as a reinvented dialect of lisp, or refuse those features, maintain their independent identity, but forever cripple their language compared to lisp?

    1. Re:Lisp by Stu+Charlton · · Score: 4, Informative

      So I don't particularly like his pigoenholing of lisp - he says there were three working extensible languages, and smalltalk was one of them, kindof not mentioning however, that lisp _wrote the book_ on extensible languages.

      I wouldn't be that hard on him.

      If you search him further you'll see he has probably done more to promote Lisp than most others whose speciality isn't _already_ Lisp.

      In his Turing award lecture this past October at OOSPLA 2004, he told the audience (paraphrased): "you owe it to yourself and your profession to seriously learn Lisp".

      --
      -Stu
  10. 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
  11. The Java vocational training quote rings true by betelgeuse68 · · Score: 5, Insightful

    But I think that's as much as a function of the fact that a developer today is standing on the shoulders of giants more than ever.

    To quote Isaac Newton, "If I have been able to see farther, it is only because I have stood on the shoulders of giants."

    Frankly, we've hit a point where there's a lot less "science" in Computer Science, or rather, the need for such training in many programming jobs.

    There's nothing wrong with a well rounded education but for some people they don't have the time or inclination to take on full engineering curriculums (as I did).

    While I don't mind have gotten a rounded education in light of where tech careers have gone, it's too bad I didn't follow my father... construction. Given his real estate holdings, I doubt I will reach his station in life (economically) if I stay on a pure tech track... highly unlikely.

    So if CS degrees are nowadays more about vocational training, so what. A tech degree of any kind, no matter how full of yourself you are, is not going to take you where it once might. That's reality. For all the noise we hear about a focus on math & science, it seems to me to be rendered somewhat moot since some Big Wig Biz guy is going to offshore such work anyway. So I ask, what's the point?

    Don't get me wrong, a good foundation in math is good, we just don't all need to become math majors...

    If you manage to learn and apply algebra, you can at least solve some practical math problems. But considering some of the stories of people who can't deal with fractions, well, obviously we're failing somewhere in the math department.

    Anyway, just rambling now...

    -M

  12. None of the above. by TapeCutter · · Score: 4, Funny

    What about the VMS fanboy, we wear cardigans, hush puppies, tweed hats and smoke pipes. We don't normally "shop" but when the leather elbow patches can no longer hang on or the felt is just too floppy, we vist the church op-shop. We always have a pencil and pad in our pocket and a small cylindrical slide rule for a quick estimate. Tuesday trivia night is our social highlight of week and the hot chocolate and lamingtons are wonderfull. We have wives but have grown to realise sex is really just another sports activity and would much rather play with the train set in the shed.

    Whoever modded the PP a Troll needs to learn how to laugh at themselves.

    Viva-la-difference

    Disclaimer: I know jack-shit about VMS or French spelling.

    --
    And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  13. Perl by Anonymous Coward · · Score: 4, Informative
    'Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term'

    Perl fills a 'tiny short-term need'? Is that why Morgan Stanley, RyanAir, Amazon, Ticketmaster and even increasingly Google to name but a few are using it for real, business-critical applications?

    I'm so sick of all this anti-Perl talk. I write powerful applications in Perl and they are definetly not 'write only'. If anyone writes a 'write only' program in any language then it is the programmer who is at fault. Perl assumes a bit of intelligence on the programmer's side, rather than adopting Java's policy of bondage. And contrary to what a previous comment said, Perl is a general purpose language (with excellent built-in data structures and regular expressions, and a convenient and expressive syntax).

    This guy might have an impressive [sic] resume, but he is badly showing his ignorance about Perl.

  14. Re: sed'ing by Black+Parrot · · Score: 4, Insightful


    > ADA is good for secure stuff

    Actually, Ada [sic] is for big, complicated software systems that you want to be able to maintain.

    Of course, maintainability is a key component of security, and Ada does offer built-in resistance to buffer overflows, but I don't think security is the primary reason for choosing Ada [sic].

    > C++ is good for GUI

    That claim isn't so much wrong as... baffling.

    --
    Sheesh, evil *and* a jerk. -- Jade
  15. Lots of good quotes. by MattRog · · Score: 4, Insightful

    One could actually argue--as I sometimes do--that the success of commercial personal computing and operating systems has actually led to a considerable retrogression in many, many respects. ...
    So I think the lack of a real computer science today, and the lack of real software engineering today, is partly due to this pop culture.
    I'd call it "Fad-driven Development" more so than pop culture. But the lack of computer science/engineering causes fad-driven development and vice-versa. It's a feedback loop.
    ...the adoption of programming languages has...been somewhat accidental, and the emphasis has ...been on how easy it is to implement the programming language rather than on its actual merits and features. ... it started spreading Basic around just because it was there, not because it had any intrinsic merits whatsoever.
    HTML, XML are prime examples of this - and also fad-driven development. Verbose, tag-based, require parsing every time, etc. -- not a very good language in any respect. Yet, people can read it. No technical intrinsic merits push XML over some other format, yet here we are.
    All of these ideas could be part of both software engineering and computer science, but I fear--as far as I can tell--that most undergraduate degrees in computer science these days are basically Java vocational training.
    This relates back to the failure of CS and fad-driven development.
    --

    Thanks,
    --
    Matt
  16. You IDIOT! by ggvaidya · · Score: 5, Funny

    You have got it so backwards, I don't even know where to start! For starters, C++ is NOT older than C - it's C's f***ing descendant! C was invented in the 1980s by the Borland corporation (it was invented as Turbo C), which was competing with Microsoft's QBASIC. C++ was created by Microsoft as an attack on Borland - perhaps you've heard of Visual C++?? Have you *ever* heard of Turbo C++? But you probably haven't, cos you're such a screwed up newbie.

    Oh, and BTW - an *operating system* in C? Jesus, where have you *BEEN*! Don't you know that almost all the OS's existing today - Windows, SCO/Linux, even MacOS - have been written in C?? And that's why there's so many bugs in all of them - because C is practically *impossible* to write good code in. That's why Apple is now switching over to Objective C, which is kinda like Apple C++. I've heard that Windows XP was written in Visual C++. And SCO/Linux was going to be ported to Java, until Microsoft paid Sun off to kill the deal and IBM sued SCO for violating their big-company-with-major-trademarks-shoots-itself-in -the-leg patent.

    Thankfully, the field is being revolutionised by people like Richard Stallman, who wrote gcc (the GNU C compiler), gvim and gnome, among many other open source programs. Finally, an advanced programming language like Perl can be used FOR FREE. Without a shadow of a doubt, Perl is the language of the future, even though it's still pretty young and all.

    (And no, HTML is NOT a language. Go a learn a REAL programming language like Javascript, n00b).

  17. I know a vast amount about computer science by kahei · · Score: 4, Funny


    LISP had it first, LISP did it better, and LISP is all you need. Let's look at why LISP is so good that it has to be mentioned ad nauseam whenever a language discussion comes up.

    1 -- LISP is simple and elegant. LISP has a pure functional design, without any of that procedural/imperative/OO junk that people use to actually write software that does stuff. LISPs purity and simplicity keep it in the lab, where languages belong.

    2 -- LISP is old. You name it, LISP implemented it way back when. Things like visual form designers, refactoring IDEs, regular expressions and the like don't count -- those aren't real language features, just modern rubbish that helps people do boring jobs.

    3 -- LISP is highly intuitive. I've used LISP for 70 years, man and boy, and that's why I realise just how intuitive LISP is. Starting off, some people find LISP a bit daunting, and they keep wanting to write 'a + b' instead of '(add a b)' just because it's "shorter" and "clearer". In fact, though, it only takes a few short years of practise with purely functional languages to find LISP completely intuitive.

    4 -- LISP is used by real professionals -- computer scientists, AI researchers from the 1980s, and Douglas Hofstatder. The post-LISP languages are used by hired help -- engineers and whatnot. I'm sorry to have to say it, but it's true. If you want to get _paid_ for programming, sure, use C# or PHP or something like that; _gentlemen_ will continue to use LISP.

    Well, I hope that's finished the 'debate' (if indeed there can be debate about what is self-evident). LISP is better, and that's that. Remember, it's not what you can _do_ with a language that matters; its how much you can _say_ about it.

    Incidentally, this post is a JOKE. LISP has exactly the strengths and weaknesses you would expect from a pure functional language. I just think it's weird that people always jump up and go 'LISP IS BETTER OH YES IT IS' when a language discussion comes round.

    --
    Whence? Hence. Whither? Thither.
  18. 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*