Slashdot Mirror


The State of Natural Language Programming

gManZboy writes "Brad Meyers (and co) of the Human Computer Interaction Institute at Carnegie Mellon have written an interesting paper about the state of natural language programming. They point out that well understood HCI principles aren't finding their way into relatively new languages like Java and C#."

2 of 387 comments (clear)

  1. Some 17 years ago ... by KlaymenDK · · Score: 4, Informative
    ... Dan Winkler created HyperCard together with Bill Atkinson.
    Granted, it was by no means a fast runner, but you could write more or less plain English to it:
    go to the last card of stack "Home"
    go to black with visual effect fade to black
    go to the previous card with visual effect venetian blinds
    get the third word of line 2 of field "Slashdot"
    put it into the messagebox
    Who could possible be confied by this code?
    Notice the brilliant little keyword called "it", that you could use with "put" and "get". Neat, simple, easy!

    eulogy
  2. Re:Programming in english sucks anyway by wmshub · · Score: 5, Informative

    Did you two (the parent & grandparent of this) really read the article? It's not about programming in English, it's not about syntax, it's about structure.

    For example, they pointed out that people think about tasks in an event-driven way, their example is "when pac-man is out of lives, the game is over". But they must program by finding where in the program the number of lives goes down, and inserting the code there. An event driven language would simplify.

    Their other example was that most languages make people think in loops, when they really want to operate on a group. Saying "for (i = 0; i len; ++i) { x[i] += 10; }" it a really clumsy way to express what people thought, which was "add 10 to everything in x".

    Anyway, I agree that parts of the article don't sound too helpful, but they aren't talking about writing in English; they're talking about changing the structure of languages to more closely match what people think.