Autochecked users, Bureaucrats, Editors, Interface administrators, Project members, Push subscription managers, Reviewers, Suppressors, Administrators, Widget editors
5,802
edits
[checked revision] | [checked revision] |
No edit summary |
CryptoUser (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{#seo: | {{#seo: | ||
|title= Programming | |title= Programming language — Decimal Wiki | ||
|titlemode= append | |titlemode= append | ||
|keywords= Programming language | |keywords= Programming language | ||
|description= Programming language | |description= Programming language | ||
}} | }} | ||
'''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. | ||
The programming language has two aspects: | |||
* '''syntax''' (rules for writing code, spelling, word order); | |||
* '''semantics''' (idea, semantic load or purpose). | |||
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". | 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 == | |||
= 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. | 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: | 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. | '''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 | 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. | ||
== Why do we need new programming languages? == | |||
= 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. | 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. | ||
== Programming languages in DecimalChain == | |||
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 = | |||
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. | |||
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 implement desktop wallet | |||
[[Category:Commoninfo]] | |||
[[Category:Software]] | |||