What is the official programming language?

What does it mean that a programming language is a formal programming language? And which languages ​​are formal programming languages? And what are the languages ​​of informal programming?

I have not yet found a good explanation.

+6
programming-languages formal-languages
source share
6 answers

Each programming language is a formal language, so it makes no sense for me to speak of a "formal programming language." (Or does someone know an informal programming language?)

A formal language is a language with mathematically precise construction rules. Or, more precisely, his set of words over a certain alphabet. For example, if you take an alphabet consisting of the letters a , b and c , the formal language over this alphabet may be the set { a , aa , aba , ca }, of course, such a language is not very useful - the fact is that with a decent set building rules, you can create a language such as C or PostScript.

As for the "building rules", they can be a formal grammar (see CSS grammar), a regular expression (see this great regular expression for email addresses, as defined by RFC 822), an automaton, or a general algorithm.


If you feel that you do not understand things a little more, do not despair, because this is not a good explanation :-) Theres thinks a lot about the concept of official languages. Id suggests you try and digest the Wikipedia entry and look for additional textbooks and books. It's fun, and you'll learn a lot about the background of compilers, regular expressions, Turing machines, and other wonders of digital humanity.

+9
source share

Formal facilities are well defined. Each programming language that can be used to define executable programs must be clearly defined so that machines can understand it.

+2
source share

Here is an excerpt from wikipedia

"John C. Reynolds emphasizes that official specification languages ​​are as many programming languages ​​as there are languages ​​to be executed. He also claims that text and even graphic input formats that affect computer behavior are programming languages, despite the fact that they are usually not Turing, and notices that ignorance of the concepts of a programming language is the cause of many shortcomings in the input formats "

0
source share

Formal languages ​​are languages ​​that do not take into account only the correct formality. This means that a sufficient and necessary condition is compliance with its rules. Sample rule:

For example, if we define the language for decimal numbers as {x | finite set of digits without leading zeros}. (just put, decimal places mean a sequence of numbers.)

So, if the language containing the rule above is formal, it must adhere to this rule.

But in practical use, if the language treats 001 as a decimal number, we can conclude that the programming language is not formal, since it does not exactly correspond to the established rule.

Usually parsers check these rules. Therefore, a formal language should always be well-formed (strictly by its own rules)

0
source share

This is not a “formal language”, it is a formal programming method: Wikipedia . This is not necessarily a specific language, but a way of writing specifications and checking code.

0
source share

Other answers relate to the definition of a formal programming language in accordance with Informatics. However, this answer relates to the definition of a formal programming language according to social (wannabe) Science.

According to dictionary.com , one of the definitions for “formal” is being in accordance with the usual requirements, customs, etc.; conventional being in accordance with the usual requirements, customs, etc.; conventional .

A formal programming language is a programming language that is widely used and accepted by the person who talks about it. So this is the domain and the conversation. Perhaps the best way to formulate is “popular,” “traditional,” “core,” or “generally accepted” programming language. For example, in business and industry this applies to SQL , Java , C# , C++ , Python and PHP .

Examples of informal programming languages ​​are SPL (Shakespeare's programming language), FORTRAN and CoffeeScript . More precisely, one language is more conditional and thus formal than another, not to mention that one language is formal and the other unofficial. In the end, Lisp will be a very informal programming language for building a website, but it is a very formal programming language for developing artificial intelligence research.

0
source share

All Articles