Programming language: Difference between revisions

[checked revision][checked revision]
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{#seo:
{{#seo:
                     |title= Programming language
                     |title= Programming language — Decimal Wiki
                     |titlemode= append  
                     |titlemode= append  
                     |keywords= Programming language
                     |keywords= Programming language
                     |description= Programming language
                     |description= Programming language
                     }}
                     }}
<div class="mikio-article-content">
<div class="mikio-tags">
</div>
<span id="jazyk_programmirovanija"></span>
= Programming language =
<div class="level1">
'''The programming language''' is a set of formal rules by which programs are written.
'''The programming language''' is a set of formal rules by which programs are written.
   
   
</div>
The programming language has two aspects:
<span id="u_jazyka_programmirovanija_est_dva_aspekta"></span>
* '''syntax''' (rules for writing code, spelling, word order);
===== The programming language has two aspects: =====
* '''semantics''' (idea, semantic load or purpose).
<div class="level5">
<ul>
<li><div class="li">
syntax (rules for writing code, spelling, word order);
</div></li>
<li><div class="li">
semantics (idea, semantic load or purpose).
</div></li></ul>
   
   
An ordinary language is needed to communicate with people, and a programming language is needed to communicate with a computer. As in any natural language, computer languages have vocabulary and semantics, but since they are much simpler than human ones, grammar is not in the first place, but syntax and word formation are important. And for the concept of "meaning" programmers use the word "semantics".
An ordinary language is needed to communicate with people, and a programming language is needed to communicate with a computer. As in any natural language, computer languages have vocabulary and semantics, but since they are much simpler than human ones, grammar is not in the first place, but syntax and word formation are important. And for the concept of "meaning" programmers use the word "semantics".
   
   
</div>
== The difference between programming languages and algorithms ==
<span id="otlichie_jazykov_programmirovanija_ot_algoritmov"></span>
= The difference between programming languages and algorithms =
<div class="level1">
Programs are needed in order for the machine to do something useful. This is impossible if there is no clear algorithm — the order of actions and rules for doing something useful.
Programs are needed in order for the machine to do something useful. This is impossible if there is no clear algorithm — the order of actions and rules for doing something useful.
   
   
The algorithm works like a route in the navigator: ""From point A we go to point B, turn in 150 meters"" . An Englishman understands it in English, a Chinese understands it in Chinese, and you and I understand it in Russian. The languages are different, but the procedure is the same: "'everyone has to get to the right place.'''
The algorithm works like a route in the navigator: "From point A we go to point B, turn in 150 meter". An Englishman understands it in English, a Chinese understands it in Chinese. The languages are different, but the procedure is the same: ''everyone has to get to the right place.''
'''Any program starts with an algorithm, but it may look different in different languages.'''
</div>
<span id="kak_kompjuter_ponimaet_raznye_jazyki_programmirovanija"></span>
= How a computer understands different programming languages =
   
   
<div class="level1">
Any program starts with an algorithm, but it may look different in different languages.
   
   
== How a computer understands different programming languages ==
'''The programming language''' is '''not''' the language of the computer. The machine understands sequences of zeros and ones: there is a voltage in the circuit — one, no — zero. Therefore, any program must first be translated into a set of such machine commands.
'''The programming language''' is '''not''' the language of the computer. The machine understands sequences of zeros and ones: there is a voltage in the circuit — one, no — zero. Therefore, any program must first be translated into a set of such machine commands.
   
   
There are two tools for this — the '''compiler''' and the '''interpreter.''' The first one works like a translation agency: you give him the entire text of the program, and he turns it into executable code, a set of commands for the processor. The interpreter is more like a simultaneous interpreter: they said the phrase — the synchronist quickly translated it, and the computer executed it.
There are two tools for this — the '''compiler''' and the '''interpreter'''. The first one works like a translation agency: you give him the entire text of the program, and he turns it into executable code, a set of commands for the processor. The interpreter is more like a simultaneous interpreter: they said the phrase — the synchronist quickly translated it, and the computer executed it.
   
   
Compilers and interpreters contain complex sets of rules for turning a programming language into machine code understandable to a computer. These are also programs. They are written by the creators of a new language — in some other, already existing one. For example, the Python interpreter is written in C, and C itself is written in assembler, almost machine code.
Compilers and interpreters contain complex sets of rules for turning a programming language into machine code understandable to a computer. These are also programs. They are written by the creators of a new language — in some other, already existing one. For example, the Python interpreter is written in C, and C itself is written in assembler, almost machine code.
   
   
</div>
== Why do we need new programming languages? ==
<span id="zachem_nuzhny_novye_jazyki_programmirovanija"></span>
= Why do we need new programming languages? =
<div class="level1">
There are already several thousand programming languages, but new ones are still being created. This is usually done to solve some specific tasks or in case of inconvenience of using an existing language.
There are already several thousand programming languages, but new ones are still being created. This is usually done to solve some specific tasks or in case of inconvenience of using an existing language.
   
   
Languages live as long as people use programs written in them.
Languages live as long as people use programs written in them.
   
   
</div>
== Programming languages in DecimalChain ==
<span id="jazyki_programmirovanija_v_decimalchain"></span>
For correct compatibility with the [[Cosmos SDK]] and [[Tendermint]], the programming language [[wikipedia:Golang|Golang]]. is used as a programming language for implementing [[DecimalChain]] functionality, namely the [[software]] of [[masternode]]s ([[validator]]s).
= Programming languages in DecimalChain =
   
   
<div class="level1">
To write backend modules, we chose [[wikipedia:TypeScript|TypeScript]], which is strictly typed and convenient in the development process, as well as compiled in [[wikipedia:JavaScript|JavaScript]], executed in modern browsers and compatible with [[wikipedia:NodeJS|NodeJS]]. In particular, Workers and Indexer are written in TypeScript.
   
   
For correct compatibility with the Cosmos SDK and Tendermint, the programming language "'Golang."' is used as a programming language for implementing Decimal functionality, namely the software of masternodes (validators).
To implement desktop wallet [[application]]s, the Decimal team used [[wikipedia:ElectronJS|ElectronJS]], which allows creating [[cross-platform application|cross-platform desktop applications]] based on [[wikipedia:JavaScript|JavaScript]], [[wikipedia:HTML|HTML]], and [[wikipedia:CSS|CSS]].
To write backend modules, we chose "TypeScript", which is strictly typed and convenient in the development process, as well as compiled in JavaScript, executed in modern browsers and compatible with NodeJS. In particular, Workers and Indexer are written in TypeScript.
To implement desktop wallet applications, the Decimal team used "ElectronJS," which allows creating cross-platform desktop applications based on JavaScript, HTML and CSS.


 
[[Category:Commoninfo]]
</div>
[[Category:Software]]
<div style="clear:both">
 
 
</div>
</div>
[[Category:Commoninfo]]

Latest revision as of 11:12, 15 February 2024

The programming language is a set of formal rules by which programs are written.

The programming language has two aspects:

  • syntax (rules for writing code, spelling, word order);
  • semantics (idea, semantic load or purpose).

An ordinary language is needed to communicate with people, and a programming language is needed to communicate with a computer. As in any natural language, computer languages have vocabulary and semantics, but since they are much simpler than human ones, grammar is not in the first place, but syntax and word formation are important. And for the concept of "meaning" programmers use the word "semantics".

The difference between programming languages and algorithms

Programs are needed in order for the machine to do something useful. This is impossible if there is no clear algorithm — the order of actions and rules for doing something useful.

The algorithm works like a route in the navigator: "From point A we go to point B, turn in 150 meter". An Englishman understands it in English, a Chinese understands it in Chinese. The languages are different, but the procedure is the same: everyone has to get to the right place.

Any program starts with an algorithm, but it may look different in different languages.

How a computer understands different programming languages

The programming language is not the language of the computer. The machine understands sequences of zeros and ones: there is a voltage in the circuit — one, no — zero. Therefore, any program must first be translated into a set of such machine commands.

There are two tools for this — the compiler and the interpreter. The first one works like a translation agency: you give him the entire text of the program, and he turns it into executable code, a set of commands for the processor. The interpreter is more like a simultaneous interpreter: they said the phrase — the synchronist quickly translated it, and the computer executed it.

Compilers and interpreters contain complex sets of rules for turning a programming language into machine code understandable to a computer. These are also programs. They are written by the creators of a new language — in some other, already existing one. For example, the Python interpreter is written in C, and C itself is written in assembler, almost machine code.

Why do we need new programming languages?

There are already several thousand programming languages, but new ones are still being created. This is usually done to solve some specific tasks or in case of inconvenience of using an existing language.

Languages live as long as people use programs written in them.

Programming languages in DecimalChain

For correct compatibility with the Cosmos SDK and Tendermint, the programming language Golang. is used as a programming language for implementing DecimalChain functionality, namely the software of masternodes (validators).

To write backend modules, we chose TypeScript, which is strictly typed and convenient in the development process, as well as compiled in JavaScript, executed in modern browsers and compatible with NodeJS. In particular, Workers and Indexer are written in TypeScript.

To implement desktop wallet applications, the Decimal team used ElectronJS, which allows creating cross-platform desktop applications based on JavaScript, HTML, and CSS.