A new programming Language.

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

  1. English is a must.
  2. 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.....

Hmm...re-inventing COBOL, I see...

Well, not really, because you could equally...

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 :slight_smile:

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!

In this past week alone... Delphi, Arduino, Java, PHP.

It's hard not to slip up and start typing in a different language every now and then....

  1. Every line of code has to end with ;

count from 1 to 10
Oh dear. Fallen at the first.

Lol.

How do you handle conditions? eg.

if it is raining;
take an umbrella;
take your lunch;

Are you going to take your lunch if it isn't raining? Cobol handled that with the period.

IF IS-RAINING
  PERFORM TAKE-UMBRELLA.
PERFORM TAKE-LUNCH.

The period on the second line terminated the "if". Mind you, the whole sense of a program could change by leaving out one tiny little dot.

Try explaining that to Management!

AWOL:

  1. Every line of code has to end with ;

count from 1 to 10
Oh dear. Fallen at the first.

it's not the end of the statement...

the line with ; is the end of the statement (consider it a nested for loop)

eg

  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
  1. Every line of code has to end with ;

(my emphasis)

it's not the end of the statement...

there has to be some form of logical control :slight_smile:

I think you're looking for PL/1, the nightmare marriage of COBOL and Algol.

there has to be some form of logical control

I eagerly anticipate its arrival.

AWOL:
I think you're looking for PL/1, the nightmare marriage of COBOL and Algol.

Or maybe LOLCODE, although it may not satisfy the first rule.

Languages are for the weak.
Real developers code in binary.
PETAQ!

Or something.

real coders use transistors...

"My favorite programming language is solder" - Steve Ciarcia

cjdelphi:
real coders use transistors...

Real coders use hardware?

Does not compute!

Dephi FTW!

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