O
O
Optimus2017-11-03 18:02:23
Programming languages
Optimus, 2017-11-03 18:02:23

High-level programming language?

Wikipedia says that high-level languages ​​are: C, C++, C#, Delphi, Fortran, Java, JavaScript, Lisp, Pascal, PHP.
But how can they be compared if the PHP interpreter is written in C. In puff and JS, we can simply use the array sort function and not know what's inside, in C and C ++ there is no such possibility as far as I beckon. Why, then, do they also write them into high-level ones? Well and flows manually in puff for example cannot be controlled.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pi314, 2017-11-03
Pyan @marrk2

Because "high-/low-level" is just a conditional and rather relative classification of languages ​​according to one specific quality - according to the level of abstraction provided by the language to its user. And when the word "abstraction" pops up, you definitely need to think about what is abstracted from what. In this case, we are talking about abstracting language constructs from the execution environment of a program written in this language. For example, all of these DLLs have abstractions such as named variable, data type, flow control constructs or system/standard library function calls, etc. We just write int a = 3; or while(flag == true)... and the rest is taken care of by the language. By comparison, in assembler (low level) we have to deal with specific registers, bits, addresses and jumps, and there is no environment that would come to our aid there either. In this sense, the level of abstraction of the same C is much higher.
This classification (like any other) is conditional, because if we compare, for example, the same Java or Sharp with the same C ++ or Pascal on this basis, then we could say that the level of abstraction of the former is "somewhat higher" - there is also an intermediate level between the program in the first languages ​​and the "environment" (bytecode / IL), and programs on the latter are compiled directly into the instructions of a particular processor. Only there is not much sense in such a statement, and in order to indicate these qualities of languages, it is easier and more useful to classify them as "compiled into virtual machine instructions" and "compiled into processor instructions".
And, finally, array sorting is a completely different story. Only the abstraction "array" applies to the language here (if at all!) In most languages ​​there is such a thing as a standard library (JDK, stl, the same modules in puff, etc.). Functions like sorting an array are not provided by the language, but by this particular library (usually written in the same language and / or at lower levels). And, in fact, a very, very small set of universal semantically unambiguous constructions, such as comparison operators, loops or function calls, is called a language. In fact, any modern language can be "learned" in a day ... the rest of your life will be spent on learning how to properly use it and its libraries to write the necessary programs))

E
evnuh, 2017-11-03
@evnuh

What is it? The desire to show off? Or dyslexia? You yourself read Wikipedia, but still do not understand? Let's try the opposite: high-level is everything that is not low-level, and low-level is "close to programming directly in machine codes"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question