低、中、高级语言,有什么区别? [英] Low, mid, high level language, what's the difference?

查看:65
本文介绍了低、中、高级语言,有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前听说过这些描述语言的术语,例如 C 不是一种低级语言,C++ 是一种中级语言,而 Python 是一种高级语言.我知道它必须对代码的编译方式和编写方式做些什么.但是我想知道是什么将语言定义为这 3 个类别之一?这些是绝对的类别,还是程序员用来相互描述语言的一般概念?

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 language. I understand that it has to do something with the way the code is compiled, and how it is written. But what I want to know is what defines a language into one of those 3 categories? Are these absolute categories, or just a general idea programmers use to describe languages to each other?

推荐答案

是的,它们只是一般术语.这与抽象有关,以及您与计算机实际执行的操作有多接近.

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 是汇编程序的升级版,因为您可以指定想要用更抽象的术语来做,但你仍然相当接近金属.

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++ 做了 C 能做的一切,但增加了功能将事物抽象为类.

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

Java/C# 在某种程度上与 C++ 做类似的事情,但没有机会做你可以在 C 中做的一切(比如 Java 中的指针操作)案例 [谢谢乔!]).不过,它们有垃圾收集功能,您必须在 C++ 中手动进行.

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 甚至更高级别,让您忘记许多需要在 Java 或 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 甚至更高级别(它是声明性的).只需说给我按年龄排序的表格中的所有项目",它就会为您找出最有效的方法.

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.

这篇关于低、中、高级语言,有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆