Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Technology

The State of Natural Language Programming 387

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#."
This discussion has been archived. No new comments can be posted.

The State of Natural Language Programming

Comments Filter:
  • HCL, HCl, or HCi? (Score:2, Informative)

    by tepples ( 727027 ) <tepples.gmail@com> on Tuesday November 16, 2004 @02:40PM (#10833137) Homepage Journal

    HCL (Hilbert Class Library) has little if anything to do with HCi (Human Computer Interaction) or HCl (hydrochloric acid). The article is about HCi.

  • by philge ( 731233 ) on Tuesday November 16, 2004 @03:12PM (#10833562)
    Applescript is alive and well an dearns me a decent living. One of the main benefits of applescripts syntax is that is it alot easier to read then it is to write because of its english like language. So when you come to look at it six month later its is a lot easier to figure out what it does.
  • by KlaymenDK ( 713149 ) on Tuesday November 16, 2004 @03:17PM (#10833610) Journal
    ... 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 [pacificavc.com]
  • Oh, you mean COBOL! (Score:3, Informative)

    by jd ( 1658 ) <imipak@yahoGINSBERGo.com minus poet> on Tuesday November 16, 2004 @03:51PM (#10834133) Homepage Journal
    I certainly believe that people drift towards computer languages that closest match the method of their thought processes, but I do not agree that you should (or even could) write a programming language that mirrors natural languages or pure thought.


    Down that path lies madness. Or Adam and the Ants.


    Fourth Generation languages expressed things in terms of the requirements, rather than the actual mechanisms involved. Such languages have been around for a while, but have largely failed in the "real world". Pushing the complexity into the compiler turns out not to reduce the errors and can actually severely impact both performance and stability.


    Fifth Generation languages tried to solve the problems generated in Fourth Generation languages by assuming that the compiler wasn't complex enough. By adding a degree of "intelligence" to the compiler, it was believed that you could increase the abstraction further (thus allowing the compiler greater freedom to choose an optimal solution) and use learning to correct mistakes in methods. Fifth Generation languages were first introduced in the mid 1980s, but nobody could figure out how to get them to work as designed.


    Fifth Generation languages forked, at some point, and the only really active area of research is in Genetic Algorithms. GA's are intriguing, but not practical outside of herustics.


    Today, the only languages used in practice are Second Generation (assembly) and Third Generation (the C family). Object Oriented programming has allowed Third Generation languages to encompass problems that would otherwise be impractical below a Fourth Generation language. This has proved a far more fruitful line of research and development. Far more "real" programs exist in Java than exist in APL or Prolog, for example.


    (There are plenty of Operating Systems written in C and C++. Could you even begin to imagine writing one in APL??)


    Parallel Programming has gone a similar path. Complex compilers, such as "Parallel C" and "Parlog", and Parallel Languages, such as "Occam" and "SISAL", were intended to replace the complexity of hand-coding parallel functions in conventional serial languages.


    Such methods died a death, as threading and event-based programming proved perfectly adequate for most purposes. Of the above, Occam is the only one I ever regarded as being particularly effective, but it's rare to see anyone still use it.


    The "advanced compiler" approach being tried these days is OpenMP, but when you look at the relative amount of time and effort invested in solutions, far more people are working on code using PVM or MPI, maybe throwing a clustering system such as Beowulf or Mosix on top, than they are using OpenMP.


    The experience of time appears to show that Third Generation languages are the optimal balance between compiler/language complexity and code complexity. As such, I expect it to be more productive to improve whole-code optimization and auditing tools for such languages. These don't require the compiler to be any more complex, as they can parse the input and/or output, in traditional Unix daisy-chaining style.

  • by Anonymous Coward on Tuesday November 16, 2004 @04:25PM (#10834626)
    (you love c) ? honk : void;
  • You say it (Score:2, Informative)

    by Anonymous Coward on Tuesday November 16, 2004 @04:26PM (#10834633)
    Actually you're much closer to truth that you think.

    People here in /. automatically assume that a natural language is a change to code syntax making it closer to English while keeping the semantics identical to C or Java. But it's the whole way around, folks.

    A natural language as stated in the article would be closer to the programmer's mental model (and no, the mind of a programmer is still not equal to a Von Neuman machine). For the very least, such a programming environment would provide incremental changes and retractions to previous decisions, as those listed in parent's joke.
  • by TuringTest ( 533084 ) on Tuesday November 16, 2004 @04:44PM (#10834889) Journal
    Sadly true. Will somebody actually RTFA and realize that 99% of the other posts are offtopic? The article isn't describing a new way to program the computer using natural language; we already have COBOL for that, and we all know how that approach works.

    The article is talking about new programming paradigms, which deprecate the old Von Neumann architecture programming model and allow for a more flexible mindset while programming. Last generation scripting languages (Python, Ruby...) would be a step in that direction. The article is proposing to explore that domain scientifically.
  • by wmshub ( 25291 ) on Tuesday November 16, 2004 @04:54PM (#10835060) Homepage Journal
    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.
  • Re:Flowcharts (Score:3, Informative)

    by owlstead ( 636356 ) on Tuesday November 16, 2004 @09:10PM (#10837872)
    In my robotics invention system 2.0 from LEGO :)

There are two ways to write error-free programs; only the third one works.

Working...