English Programming Language | |||||||||||||||||
Alright... I had this thought last night as I was thinking about assembly. My programming background isn't that heavy.. mostly consists of some Visual Basic and now learning some 6805 assembly stuff.. but last night I had this thought. With the advanced (high level or very high level) text manipulation and interpretation that can be performed these days, how come we haven't seen an English Programming Language? :) Being rooted in BASIC, I understand that this was the idea behind BASIC... a programming language that everyone can learn to understand and use quickly. But what would be even easier, now that it's likely possible, is a plain english programming language. By this, I mean the source file would be something like a text file.. and the interpreter would interpret the english language commands and build a program based on it. The commands for the English Programming Language could be something like this (consider this a raw source file): <begin source> First, create a window approximately 75% of the screen size. Then, add two menus to the top, one File and one Help. Under the File menu, add Exit. When a user clicks on Exit, the program should exit. Under the help menu, add a simple About option that describes this program. Now create two buttons in the main window (the first one). The first button should say "Message", and the second one should say "Exit" (without the quotes). When a user clicks on Message, a message box should pop up saying "Hello, World!". When the user clicks on the Exit button, the program should exit. <end source> Now, I realize that at first it would be hard to create an interpreter to interpret all the instructions in that English Source Code.. but I'm sure that if it was attempted in steps (first, perhaps in point form.. then expand the interpretation engine to interpret sentences). I think one would find that as the engine is created, it should be easy to spot algorithms and such that could be improved upon, thus making the interpretation a lot better. I'm not sure how applicable this would be to our society these days.. and how useful it would be. But like I said, I had the thought last night and decided what the heck.. I'll throw it out there to see if anyone else finds the idea as interesting as I do. :) Either way, it sure would be neat. :) Dylan
Dteyn, Jul 04 2004
What do you think of this idea or comment? | |||||||||||||||||
Users who liked this idea also liked: | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Add your comment
First of all, programming languages based on English already exist. In Perl, a 'use English' clause will force perl to parse an English-like syntax. Applescript, a scripting language on the Macintosh, is extremely English-like.
The problem with English-like programming languages is that while they're easy to read, they can be hard to write. Applescript programmers will attest to that. English is a wonderful language for expressing human ideas, but is very inefficient for writing computer instructions. There is just too much redundancy in the syntax, and too much variability.
Natural-language programming languages were a fad in the 80s. The fad died off when people realized that it didn't really work - it made them less productive rather than more.
The best way of doing this, is following Apple's example with their Cocoa framework and Obj-C. Instead of hard to read variables and function names, use descriptive names.
Ok, let's get to the problem this idea is trying to solve: Writing and maintaining software is difficult, error prone, and requires a lot of training. Languages have a long way to go, but becoming English-like isn't the solution to the problem, I think.
I worked with a helpdesk tool that used a "knowledge-base" of information to help you figure out a problem. This was basically just hypertext pages (like HTML) with questions and answers that you clicked until you found your solution. Examples: "What OS are you using?" "Is the printer plugged in?" etc.
This technique could be used as a code wizard to help with writing/generating programs. When a user selects a solution, code is generated and added to the program. I imagine would achive the goal(s) of the original entry more than an English-like language.
This tool would have to be very sophisticated. It would work like a wiki. Users would extend it on-the-fly as they create solutions it doesn't already support.
Example:What type of program do you want to write? (B) GameWhat type of Game? (D) First person shooteryada yada yadaWhen player one hits a wall, what should occur?
Perhaps I should post this as a separate idea. The more I think about it the cooler it gets. However, it could use some refinement.
Look up the Ruby programming language, especially the Rails development platform ("Ruby on Rails"). Also look at LISP, Scheme, or other artificial-intelligence-inspired languages, as well as object-oriented languages generally. A good source is Wikipedia.
I couldn't see why not either - and that is how KES was born. The main problem I see with AppleScript and previous efforts are: 1) A fixed syntax, one that is not changeable by the community, defeats the entire purpose. The whole point of using English is not having to memorize APIs. This means that the community must be able to improve on the API - to figure out the most intuitive APIs.2) NLP is only useful if human programming patterns can be captured. Having to think like a computer in English is not very helpful.3) It should deal with ambiguity and lack of detail. The whole point of NLP is not having to learn - not having to know - how to program. If you're required to read extensive manuals to know every detail and option that must be set, why bother?
KES is an expert system - a meta language - and it's able to perform these tasks rather well.
Andrew Szczeszynski
English is imprecise and ambiguous, not to mention loopholes caused by things you didn't mention.
If you need precise, unambiguous English with no loopholes, hire a lawyer to write the contract for you.
If you need a good program with no bugs, hire a programmer.
The skills are similar, writing something using only words whose meaning is defined, and make sure there are no loopholes. If you don't think English is imprecise and ambiguous, try using one of the automatic translators on the internet.
Take a look at our product here: www.osmosian.com. It's not exactly what you describe, but it actually works. And is robust enough to recompile itself. In less than three seconds.
If you'd like a sample copy for evaluation, write us here: help@osmosian.com.
If you want to work in the limited world of instructional, GUI based programming and your programs have no significant knowledge content in themselves then you better stick with traditional programming. This type of limited programming can be done in the languages available, by using variables that explain what they are.
If you are the more imaginative type who would like to develop shared understadning between the machines you use and yourself then a tool and complete system (including document reader agent and authoring tool) is available at www.system-english.com . Using that a program is readable document in English, i.e. in sEnglish
sEnglish is suitable to develop proper intelligent systems with sensing decision making, planning and problem solving into which you can not only easily have insight into but can enjoy the brand new concept of "shared understanding" with machines.
However, sEnglish is not about natural language interfacing, it is a new paradigm of programming.
===============================Prof Sandy M VeresUniversity of Southampton, UK