Low, mid, high level language, what's the difference?

后端 未结 12 902
遇见更好的自我
遇见更好的自我 2020-12-22 17:37

I\'ve heard these terms thrown around describing languages before, like C is not quite a low level language, C++ is a mid level, and Python is a High level

相关标签:
12条回答
  • 2020-12-22 18:16

    Very low-level: Machine Code

    Low level: Assembler, Forth

    Mid level: C, C++, most system programming languages

    Mid/High level: D, Go, garbage collected system programming languages

    High level: Java, C#, most interpreted languages

    Even Higher level: Lisp dialects

    Highest level: SQL, declarative programming languages

    If there is anything else to be added, tell me.

    0 讨论(0)
  • 2020-12-22 18:20

    Yes, they're just general terms. It's to do with abstraction, and how close you are to what the computer's actually doing.

    Here's a list of programming languages ranging from very low to very high level:

    • Machine Code could probably be considered the lowest level programming language.

    • Assembly language is at the level of telling the processor what to do. There is still a conversion step towards machine code.

    • C is a step up from assembler, because you get to specify what you want to do in slightly more abstract terms, but you're still fairly close to the metal.

    • C++ does everything that C can do but adds the capability to abstract things away into classes.

    • Java/C# do similar things to C++ in a way, but without the opportunity to do everything you can do in C (like pointer manipulation in Java's case [thanks Joe!]). They have garbage collection though, which you have to do manually in C++.

    • Python/Ruby are even higher level, and let you forget about a lot of the details that you would need to specify in something like Java or C#.

    • SQL is even higher level (it's declarative). Just say "Give me all the items in the table sorted by age" and it will work out the most efficient way to carry this out for you.

    0 讨论(0)
  • 2020-12-22 18:24

    They aren't absolute. They are all relative to what other languages are being used in industry at the time. For example, there was a time when assembly was considered mid-level.

    The 'level' is essentially a measure of how abstracted the programmer is from the actual hardware-based operations. In a low level language you might have to care about actual memory locations, whereas in a high-level you just create variables and let the OS handle memory.

    A normal CPU processes either 32 or 64-bit instructions. In the simplest form, think of this as an 32 1's and 0's in a row - that's what the processor actually interprets and executes. Writing this directly (machine code) would be the 'lowest-level'.

    0 讨论(0)
  • 2020-12-22 18:24

    it is all relative... the "level" reflect the amount of abstraction.

    0 讨论(0)
  • 2020-12-22 18:25

    Low level means closer to the machine, and therefore more difficult and more powerful. The higher level you get, the more removed from the machine and "English-like" you get, but you lose a lot of the power and functionality that comes with being able to control the minute details of the machine. Higher level languages also generally tend to protect you more and have much more precautions and checks in place, while lower level languages trust you, so to speak, and let you play around at your own risk.

    0 讨论(0)
  • 2020-12-22 18:29

    Low level languages are very close to machine language that may be binary or RTL. Hard to write and very quick to execute. It can interacts with the hardwares and high level programming language is very easy to write but can be executed after compilation.

    0 讨论(0)
提交回复
热议问题