2

I've always used the term canonical syntax to refer to a computer language, the syntax of which is verbose and resembles the patter in conventional human speech. Recently, I learned that canonical actually means accepted by vast consensus, so I'm lacking a word in my vocabulary now. Actually I lack two, because the opposite of that I referred to as uncanonical syntax.

Example for the different syntaxes' look.

 if condition is true  
    then begin call donkey end  
    else begin exit end  
 end if  

 if(condition)  
    donkey();  
 else  
    exit();

To make it easier to come up with a great answer, I'm quoting from one of the comments.

"Cobol and SQL have XXX syntax, while C# and Java have YYY syntax, whereas LINQ has both XXX and YYY syntaxes."

What would appropriate values for XXX and YYY be?

12
  • Grammatical ? ..
    – user66974
    Jan 19, 2016 at 19:31
  • 3
    The term from way back when folks actually thought this possible is "natural language syntax".
    – Hot Licks
    Jan 19, 2016 at 19:31
  • 2
  • 1
    This article may help. I think "fifth-generation" language is what you are looking for.
    – cobaltduck
    Jan 19, 2016 at 19:40
  • You may have to reorganize your thinking. 'Declarative' and 'procedural' are often used to describe different approaches to computer languages that are more ('declarative') or less ('procedural') similar to natural language. See pp. 6-7 at SQL the natural language for analysis for some discussion.
    – JEL
    Jan 19, 2016 at 19:41

1 Answer 1

3

Perhaps English-like.

From the 1950's, Admiral Grace Hopper promoted the idea that computers should be programmed using English words rather than numerical codes. She is often cited as the inventor of the compiler and credited for the development of the COBOL language, one of the first high-level programming languages.

COBOL (/ˈkoʊbɒl/, an acronym for common business-oriented language) is a compiled English-like computer programming language designed for business use.
Wikipedia

Below is a sample of COBOL syntax (by Michael Coughlan)

PERFORM 3 TIMES
   DISPLAY "Enter First Number      : " WITH NO ADVANCING
   ACCEPT Num1
   DISPLAY "Enter Second Number     : " WITH NO ADVANCING
   ACCEPT Num2
   DISPLAY "Enter operator (+ or *) : " WITH NO ADVANCING
   ACCEPT Operator
   IF Operator = "+" THEN
      ADD Num1, Num2 GIVING Result
   END-IF
   IF Operator = "*" THEN
      MULTIPLY Num1 BY Num2 GIVING Result
   END-IF
   DISPLAY "Result is = ", Result
END-PERFORM.

As prompted in a comment by ermanen, if the language syntax is meant to be very close to forming grammatically correct sentences, then the term natural-language-like could be applied. The whole endeavor could be categorized as natural language programming, as noted by HotLicks.

6
  • Well, Cobol would be an example of such a language. What would you say here? "Cobol and SQL have XXX syntax, while C# and Java have YYY syntax, whereas LINQ has both XXX and YYY syntaxes." Jan 19, 2016 at 20:00
  • Yeah, COBOL was going to allow managers to program (and SQL would allow them to run database queries). That lasted about 5 minutes.
    – Hot Licks
    Jan 19, 2016 at 20:04
  • Oh, my bad. I got side-tracked by on of the comments and though that Cobol was your answer. My bad. Well, it's at least a good attempt, although I hoped for a "real" adjective. What would you say the opposite of that be? I know that both Russians and French constructed languages that were Cobol-like but definitely not English-like... Jan 19, 2016 at 20:06
  • I often hear programming language syntax described in terms of the languages they resemble. So C-like or Pascal-like or LISP-like are things I would understand when presented to me. So COBOL-like should be perfectly acceptable.
    – jxh
    Jan 19, 2016 at 20:10
  • 1
    Well, it is going to be a bit clumsy but you can use the adjective "natural-language-like" to cover all natural languages. You can find some examples in Google Books also: google.ca/…
    – ermanen
    Jan 19, 2016 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.