After thinking, and thinking.... if I look at all the languages out there, Pascal, C, C++, Python, PHP... etc etc, long long list....
They all have one thing in common, we all have to take the time out to learn the language, how it works, so that got me thinking, could there be a "language" out there that makes it possible for everyone to write programs to some degree.
So, my rules for this new programming language...
English is a must.
Every line of code has to end with ;
Here's some sample code for my none existent compiler...
Clear Screen;
Display Mouse Position;
count from 1 to 10
display count bottom left of screen;
Obviously there would be some huge hurdles, but a language you can just dictate too... and it just "does it" maybe this has been suggested before.....
myroutine:
{
make a username box;
make a password box;
request username;
request password;
if username is blank
alert the user there is a problem with username
leave;
if password is blank
alert the user there is a problem with password
leave;
}
main()
{
make an edit box;
create an edit box;
display time top right corner;
popup a box in the middle of the screen asking for confirmation;
when user agrees call myroutine;
ask the user if he or she wishes to exit the program?;
if the user says no
repeat main(); //how annoying this program would be!
}
The compiler being smart enough to understand what you're asking (with the many variations of english is hard...) will be the difficult part
Agreed. Cobol. Except for the semicolon requirement.
"Sentences" in Cobol ended with a period (like this one).
we all have to take the time out to learn the language, how it works, so that got me thinking, could there be a "language" out there that makes it possible for everyone to write programs to some degree.
That was the philosophy behind Cobol. It was intended for "anyone" to be able to write in it, and even for management to be able to pick up a Cobol program and see if it worked the way it should.
I'll let you guess whether it actually met this design intention.
For some reason this brought to mind the following passage from the preface of The Art of Computer Programming, Vol. 1.
There is no reason why a student should be afraid of learning the characteristics of more than one computer; indeed, he may expect to meet many different machine languages in the course of his life, and once one machine language has been mastered, others are easily assimilated.
-- Donald E. Knuth, 1967
And from section 1.3,
There should be no hesitation about learning a new machine language; indeed, the author has found it not uncommon to be writing programs in a half dozen different machine languages during the same week!
if thevalue is equal to 12
display message happy birthday, you're 12!!!!;
if thevalue equals 11
display message you're getting on a bit aint ya matey?
popup messagebox asking if he needs help operating the program;
------------------------
count from 1 to 5
count from 1 to 2
display first value
display second value
newnewvalue equals first value multiplied by second value
if newvalue is 32
display message value 32!
otherwise
display message it's not value 32 at all!;
------------------
consider that block finished when it hits the ;
//; = signifiying end of nested statement
This made me remind of the fictional, humorous C+- (C More or Less) language that appeared on UseNet a few decades ago.
I can't find the full complete text of the C+- joke in the web (I have it at home), but the above is complete enough. The complete "reference to C+-" includes keywords such as EvenIf