Difference between revisions of "Universal Prokee Language"

From prokee
Jump to navigation Jump to search
(The Chinese Influence)
(Is-A Relationship)
 
(6 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
Some inspiration for UPL comes indeed from the Chinese language.
 
Some inspiration for UPL comes indeed from the Chinese language.
  
In most languages, written words are representations of their phonetic sequence. The atomic symbols of the written language therefore represent the sounds, which form the words of the language. The amount of different sounds of a human language is very small, so a small alphabet is sufficient to be able to write every word of such a language. The difference to Chinese is, that the defining element of a word of western (or non Chinese) languages, is how it sounds, its phonetic sequence. By knowing all spelling rules one can write and read German or English words without understanding them.
+
In most languages, written words are representations of their phonetic sequence (spoken words). The atomic symbols of a written language (the letters) therefore represent the sounds, which form the spoken words of that language. The amount of different sounds of a human language is very small, so a small alphabet is sufficient to be able to write every word of such a language. By knowing all spelling rules one can theoretically write and read German or English words without necessarily being able to understand them. In contrast, the Chinese language is completely different.
  
In Chinese the meanings of words are represented by Symbols (Chinese characters) directly, without being required to know a how word is spoken. At the early beginnings of the Chinese language every symbol represented a word and every word was written by a single symbol. And also today most Chinese words consist of only very view (one or two, rarely 4 ore more) characters. The consequence of this is, that a huge "alphabet" is required, and avoiding the introduction of unnecessary symbols is essential.
+
In Chinese the meanings of words are represented by Symbols (Chinese characters), without being required to know how a word is spoken. At the early beginnings of the Chinese language every symbol represented a word and every word was written by a single symbol. And also today most Chinese words consist of only very few (one or two, rarely 4 or more) characters. The consequence of this is, that a huge "alphabet" is required, and avoiding the introduction of unnecessary symbols is essential.
  
In German f.e. we have inflection of nouns and verbs. German words come in different forms regarding to cases (nominative, accusative, genitive and dative), genders (masculine, feminine and neuter), number (singular or plural), conjugation classes, persons (first second and third), moods (infinitive, indicative, imperative and subjunctive), voices (active and passive), tenses and so on. All those different forms are essential for German.
+
In German e.g. we have inflection of nouns and verbs. German words come in different forms regarding to cases (nominative, accusative, genitive and dative), genders (masculine, feminine and neuter), number (singular or plural), conjugation classes, persons (first second and third), moods (infinitive, indicative, imperative and subjunctive), voices (active and passive), tenses and so on. All those different forms are essential for German.
  
In Chinese, we have only one character representing a word (or a view characters for compound words). So the information carried by all the different forms of words as we have them in German, have to be encoded in a different way. This is done by replacing inflection with word order.
+
Trying to write German with Chinese characters would fail, because all the different forms of words in German would require to invent lots of new different Chinese characters. This would result in way to many characters for a human to be able to remember. But how does the Chinese language encode the same information with much fewer words? It does so by replacing inflection with word order.
  
When we look at computer languages, we normally do not have infection of keywords, but we do have a fixed word order to build valid sentences. Therefore, when we want to develop a programming language, which is more like human languages, Chinese would be a promising language to start with.
+
When we look at computer languages, we normally do not have inflection of keywords, but we do have a fixed word order to build valid sentences. These similarities and the differences to other natural languages resulted in considerations to develop a new language, that is as simple as possible by focusing on word order and eliminating the overhead in complexity common to all natural languages, which includes Chinese as well. So we do not want to program in Chinese but rather take some inspirations from it, to develop a completely new language.
  
 
== Semantic Nets ==
 
== Semantic Nets ==
Line 18: Line 18:
  
 
=== Has-A Relationship ===
 
=== Has-A Relationship ===
The has-a relationship between two objects (or words) describes ownership. F.e. a '''car''' ''has-a'' '''steering wheel'''.
+
The has-a relationship between two objects (or words) describes ownership. E.g. a '''car''' ''has-a'' '''steering wheel'''.
  
 
The has-a relationship is the default relationship between consecutive words. The sentence "A car has a steering wheel." translates into UPL as shown below.
 
The has-a relationship is the default relationship between consecutive words. The sentence "A car has a steering wheel." translates into UPL as shown below.
Line 25: Line 25:
  
 
=== Is-A Relationship ===
 
=== Is-A Relationship ===
The is-a relationship between two objects (or words) describes inheritance. F.e. a '''car''' ''is-a'' '''vehicle'''.
+
The is-a relationship between two objects (or words) describes inheritance. E.g. a '''car''' ''is-a'' '''vehicle'''.
  
 
The default is-a operator is the colon ':'. The sentence "A car is a vehicle." translates into UPL a shown below.
 
The default is-a operator is the colon ':'. The sentence "A car is a vehicle." translates into UPL a shown below.
Line 31: Line 31:
 
Multiple inheritance can be established by stating all superclasses concatenated by a comma ','.
 
Multiple inheritance can be established by stating all superclasses concatenated by a comma ','.
  
F.e.
+
E.g.
 
  C:Letter,ProgrammingLanguage,RomanNumeral
 
  C:Letter,ProgrammingLanguage,RomanNumeral
 
would be interpreted as: 'C' is a letter, a programming language and a roman numeral.
 
would be interpreted as: 'C' is a letter, a programming language and a roman numeral.

Latest revision as of 18:28, 13 July 2019

The Universal Prokee Language (UPL) is a programming language based on natural languages and semantic nets.

Programming in Chinese?

Some inspiration for UPL comes indeed from the Chinese language.

In most languages, written words are representations of their phonetic sequence (spoken words). The atomic symbols of a written language (the letters) therefore represent the sounds, which form the spoken words of that language. The amount of different sounds of a human language is very small, so a small alphabet is sufficient to be able to write every word of such a language. By knowing all spelling rules one can theoretically write and read German or English words without necessarily being able to understand them. In contrast, the Chinese language is completely different.

In Chinese the meanings of words are represented by Symbols (Chinese characters), without being required to know how a word is spoken. At the early beginnings of the Chinese language every symbol represented a word and every word was written by a single symbol. And also today most Chinese words consist of only very few (one or two, rarely 4 or more) characters. The consequence of this is, that a huge "alphabet" is required, and avoiding the introduction of unnecessary symbols is essential.

In German e.g. we have inflection of nouns and verbs. German words come in different forms regarding to cases (nominative, accusative, genitive and dative), genders (masculine, feminine and neuter), number (singular or plural), conjugation classes, persons (first second and third), moods (infinitive, indicative, imperative and subjunctive), voices (active and passive), tenses and so on. All those different forms are essential for German.

Trying to write German with Chinese characters would fail, because all the different forms of words in German would require to invent lots of new different Chinese characters. This would result in way to many characters for a human to be able to remember. But how does the Chinese language encode the same information with much fewer words? It does so by replacing inflection with word order.

When we look at computer languages, we normally do not have inflection of keywords, but we do have a fixed word order to build valid sentences. These similarities and the differences to other natural languages resulted in considerations to develop a new language, that is as simple as possible by focusing on word order and eliminating the overhead in complexity common to all natural languages, which includes Chinese as well. So we do not want to program in Chinese but rather take some inspirations from it, to develop a completely new language.

Semantic Nets

A semantic net is a representation of words (or objects, or classes of objects) and the relationships between those words.

Has-A Relationship

The has-a relationship between two objects (or words) describes ownership. E.g. a car has-a steering wheel.

The has-a relationship is the default relationship between consecutive words. The sentence "A car has a steering wheel." translates into UPL as shown below.

Car SteeringWheel

If we refer to the steering wheel, the statement above may also be interpreted as "the steering wheel of the car" or "a steering wheel of a car". See #Paths and Queries on how to refer explicitly to a specific item.

Is-A Relationship

The is-a relationship between two objects (or words) describes inheritance. E.g. a car is-a vehicle.

The default is-a operator is the colon ':'. The sentence "A car is a vehicle." translates into UPL a shown below.

Car:Vehicle

Multiple inheritance can be established by stating all superclasses concatenated by a comma ','.

E.g.

C:Letter,ProgrammingLanguage,RomanNumeral

would be interpreted as: 'C' is a letter, a programming language and a roman numeral.

Other Relationships

Other relationships can be established by a concatenation of has-a and is-a relationships.

Paths and Queries