高级语言的定义? [英] definition of a highlevel language?

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

问题描述

(可能不是正确的论坛,但......)


高级语言的定义是什么?


那里没有专门的维基百科和类似的东西只是

a非常一般的描述obv你可以说它抽象了低价的

操作。

是的但是怎么样?


a函数就像map一样有效并将它应用到

例子的列表中。

这抽象了一个常见的程序,如遍历列表和

为每个位置进行计算。

因此它是一个更高阶函数。这是如何构建更高级别的语言

所以它们的构建基本上是不同的,或者只是很多

低级操作建立在彼此之上?

haskell被认为是一种非常高级的语言,但是你可以用它做b $ b系统编程(是的,这可能是非常不切实际的我不用

知道,但是你可以)?

lambda演算是一种更抽象,更有效的建模

计算机的方法吗?这意味着你从一个更高的抽象层开始,并且可以更快地工作到更高的价格吗?

lispmachines是如何工作的?在LISP中编程的基本系统是什么?

(might not be the right forum for this but...)

what is the definition of a highlevel-language?

well there isnt one specifically and wikipedia and the like gives just
a very general description obv you can say it abstracts away lowlever
operations.
yes but how?

a function like map takes a function and applies it to a list for
example.
this abstracts away a common procedure like iterate through a list and
for every position do a computation.
so it is a higherorderfunction. is this how higher-level-languages are
built?
so are they fundamentally differently built or is it just a lot of
lowlevel operations built on top of each other?
haskell is considered a very highlevellanguage but can you do
systemsprogramming with it(yes maybe it is very unpractical i dont
know but can you)?
is lambda calculus a more abstract and efficient way of modeling a
computer? meaning you start at a higher level of abstraction and can
work up to even higher even faster?
how did lispmachines work? was the basic system programmed in LISP?

推荐答案

高级别没有明确的定义。一个人可以明确地使用
将编程语言分类为高级别

和不高级别,或者低级别。


我的个人定义是这样的:高级

语言是一种让你解决问题的语言而不必担心

意外复杂性。通过意外复杂性,我的意思是手动内存管理,需要明确关闭文件,

等等。


当然,我认为Python是高级别。这是收集的垃圾

,因此,没有手动内存管理(大部分时间 -

有时GC需要帮助);如果我想迭代一个序列,

我不必像你这样做c

max = len(seq);

for(int i = 0; i< max; ++ i){

用seq [i]做某事;

}


我只是这样做:


for seq中的物品:

用物品做点什么


另一条指向Python'高级状态的证据是

如果你看一些非常接近实际编程 -

语言看伪代码,然后将其翻译成Python,通常是
Python代码并不比伪代码本身长得多。在

另一方面,将伪代码转换为C或Java通常会产生50-100%的代码行数比伪代码行更多。
There is no solid definition of "high level" that one can
unambiguously use to classify programming languages into "high level"
and "not high level," or "low level."

My personal definition is something along the lines of: a high-level
language is one which lets you solve problems without worrying about
"accidental complexity." By "accidental complexity," I mean such
things as manual memory management, needing to explicitly close files,
etc.

Of course, I consider Python to be "high level." It''s garbage
collected, so, no manual memory management (most of the time --
sometimes the GC needs help); if I want to iterate through a sequence,
I don''t have to do crap like

max = len (seq);
for (int i = 0; i < max; ++i) {
do something with seq[i];
}

I just do:

for item in seq:
do something with item

Another piece of evidence that points to Python''s high-level status is
that if you take a look at some "pretty close to actual programming-
language looking pseudocode," then translate it into Python, typically
the Python code is not much longer than the pseudocode itself. On the
other hand, translating pseudocode to C or Java often results 50-100%
more lines of code than there were lines of pseudocode.


5月26日上午11:34,notnorweg ... @ yahoo.se写道:
On May 26, 11:34 am, notnorweg...@yahoo.se wrote:

a的定义是什么高水平的语言?
what is the definition of a highlevel-language?



它是相对的。低级语言更低/更接近

计算机的二进制代码。与

汇编相比,C / C ++是一种高级语言。 Python是高级别的,而不是C / C ++。与电子表格编程相比,Python是低级别的b $ b,尽管像

Gnumeric这样的一些电子表格可以使用Python扩展。

It is relative. A low-level language is lower/closer to the
computer''s binary code. C/C++ is a high-level language compared to
assembly. Python is high-level vs. C/C++. Python is low-level
compared to "spreadsheet programming", although some spreadsheets like
Gnumeric can use Python extensions.

5月26日,2:34 * pm,notnorweg ... @ yahoo.se写道:


我想解决其他一些我在第一次提到的问题

响应。
On May 26, 2:34*pm, notnorweg...@yahoo.se wrote:

I wanted to address some other points I failed to mention in my first
response.

所以它们的构建基本不同,或者只是很多

低级操作构建在彼此之上?
so are they fundamentally differently built or is it just a lot of
lowlevel operations built on top of each other?



部分。高级语言本质上是一个为你提供高b / b $ b级操作的语言,比如将函数f应用于

序列seq的每个元素,并返回[ f(seq [0]),f(seq [1]),... f(seq [n])]。


但是,它不止于此。 (你使用Haskell作为你的例子,但是我会用
使用Python,因为我知道它比大约百万分之百的价值好几百万美元。或者是
Haskell ......呵呵。)在Python中,你有语言的支持

将函数视为一流的对象;在C中,你明确地不能这样做 - 在一个序列上映射任意函数,你只需要通过指针访问函数来限制b $ b。在

表面,这是相同的操作,但额外的间接水平

可能真的让人心烦意乱。考虑一下,对于

实例来说,解释一个函数指针声明的人是多么困难。

Partly. A high-level language is essentially one that gives you high-
level operations, like "apply the function f to each element of the
sequence seq, and return [f(seq[0]), f(seq[1]), ... f(seq[n])].

But, it''s more than that. (You use Haskell as your example, but I''ll
use Python because I know it roughly a million percent better than
Haskell... hehe.) In Python, you have support from the language to
treat functions as first-class objects; in C, you explicitly cannot do
this -- to map an arbitrary function over a sequence, you''re
restricted to accessing the function through a pointer. On the
surface, it''s the same operation, but that extra level of indirection
can really bog one''s mind down. Think about how difficult it is for a
human to interpret the declaration of a function pointer in C, for
instance.


haskell被认为是一种非常高级的语言,但是你可以用它进行
系统编程(是的,这可能是非常不实际的,我不知道你知道但是你能知道吗?)
haskell is considered a very highlevellanguage but can you do
systemsprogramming with it(yes maybe it is very unpractical i dont
know but can you)?


是lambda演算是一种更抽象,更有效的建模
计算机的方法吗?
is lambda calculus a more abstract and efficient way of modeling a
computer?



Lambda演算并不能模拟计算机。它模拟*计算*。

也就是说,给定一个图灵机,在

lambda演算中有一组函数,当合适地组合时,它将会产生确切的

与原来的图灵机相同。这绝不是什么意思

暗示图灵机器通过解释lambda演算来工作。

Lambda calculus doesn''t model computers. It models *computation*.
That is, given a Turing machine, there''s a set of functions in the
lambda calculus, which, when suitably combined, will yield the exact
same result as the original Turing machine. That doesn''t in any way
imply that Turing machines work by interpreting lambda calculus.


lispmachines是如何工作的?是LISP编程的基本系统吗?
how did lispmachines work? was the basic system programmed in LISP?



是的,整个套件和kaboodle,一直到微码都是在LISP编程的
。原则上,我们没有理由不能使用Haskell机器或Python机器。我知道,只是没有人能够疯狂地做到这一点。 :-)

Yes, the whole kit and kaboodle, all the way down to the microcode was
programmed in LISP. In principle, there''s no reason we couldn''t have
Haskell machines or Python machines. It''s just that nobody''s been
crazy enough to do it, that I know of. :-)


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

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