Python有什么独特之处? [英] What is unique about Python?

查看:71
本文介绍了Python有什么独特之处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是计算机科学专业的学生,​​并且最近一直试图用b $ b说服教授编程语言设计的教授

课程考虑提及脚本语言未来。沿着那些线路,我一直在试图想到Python的功能,以及

一般的脚本语言,这些语言在旧语言中找不到,

并且遇到了惊人的麻烦。动态打字

可以在Smalltalk中找到,模块概念可以在Ada中找到,

功能参数和动态创建功能可以是

在Lisp中找到。基于缩进的语法似乎是独一无二的,但是

并不是我真正想要的。所以我想知道,无论是在设计还是实现方面,对于Python有什么创新?或者

它的神奇之处在于以非常愉快的方式结合以前的

语言的许多有用功能?


Greg

解决方案

gsteff写道:

我是计算机科学专业的学生,​​最近一直在努力<说服教授编程语言设计的教授当然要考虑将来提及脚本语言。沿着这些路线,我一直在试图想到Python的功能,以及一般的脚本语言,这些语言在旧语言中找不到,
并且一直有一个惊人的麻烦。动态类型可以在Smalltalk中找到,模块概念可以在Ada中找到,
功能参数和动态创建的功能可以在Lisp中找到。基于缩进的语法似乎是独一无二的,但
并不是我想要的。所以我想知道,在设计或实现方面,Python的创新是什么?或者它的神奇之处还在于以非常愉快的方式结合以前的语言的许多有用功能?




IMO它是后者。 Python的大多数功能都可以在其他语言中找到。不是

这么多语言都有。它结合了易用性和强大功能,使得Python获得了巨大的成功。


Kent


< blockquote>也许你应该问问自己为什么你首先喜欢Python,然后

你可能会有答案。


我会说那个Python完全是关于生产力的。

你可以用更少的时间和更少的代码行完成更多工作,因为

它更具有整体性,灵活性和表现力。 />
它也非常清晰,易于编写且易于阅读。

您无需在运行代码之前进行编译,而且它的

交互性可让您在编写算法时更快地尝试和尝试不同的方法。与其他任何传统语言相比,这样可以获得更好的结果和更快的价格。


Luis


>>基于缩进的语法似乎是独一无二的


我认为Haskell首先出现在那里。和ABC一样,是Python的'b $ b前体之一。


Python是一种实用的语言,就像C一样(我希望我能说<关于Java的
)。它不一定是创新,而是包含已知在其他地方工作的东西。 C和Java没有做任何特别的事情。

也是唯一的。它们的受欢迎程度包含在课程中。

这不是一个足够好的论点吗?


I''m a computer science student, and have recently been trying to
convince the professor who teaches the programming language design
course to consider mentioning scripting languages in the future. Along
those lines, I''ve been trying to think of features of Python, and
scripting languages in general, that can''t be found in older languages,
and have been having a surprising amount of trouble. Dynamic typing
can be found in Smalltalk, the module concept can be found in Ada,
functional parameters and the dynamic creation of functions can be
found in Lisp. The indentation-based syntax seems to be unique, but
that''s not really what I''m looking for. So I''m wondering, what is
innovative about Python, either in its design or implementation? Or is
its magic really just in combining many useful features of prior
languages in an unusually pleasant way?

Greg

解决方案

gsteff wrote:

I''m a computer science student, and have recently been trying to
convince the professor who teaches the programming language design
course to consider mentioning scripting languages in the future. Along
those lines, I''ve been trying to think of features of Python, and
scripting languages in general, that can''t be found in older languages,
and have been having a surprising amount of trouble. Dynamic typing
can be found in Smalltalk, the module concept can be found in Ada,
functional parameters and the dynamic creation of functions can be
found in Lisp. The indentation-based syntax seems to be unique, but
that''s not really what I''m looking for. So I''m wondering, what is
innovative about Python, either in its design or implementation? Or is
its magic really just in combining many useful features of prior
languages in an unusually pleasant way?



IMO it is the latter. Most of the features of Python can be found in other languages. Not
so many languages have them all. It is the combination of ease of use and power that makes
Python stand out.

Kent


Perhaps you should ask yourself why you like Python first, and then
you''ll probably have an answer.

I''d say that Python is all about productivity.
You can get more done in less time and with fewer lines of code because
it''s more consice, flexible and expressive.
It''s also very clear, easy to write and easy to read.
You don''t need to compile before running your code, and its
interactivity lets you experiment and try different approaches faster
and better when writing algorithms. This leads to better results and
much faster than with any other traditional language.

Luis


>> The indentation-based syntax seems to be unique

I think Haskell was there first. As well as ABC, one of Python''s
precursors.

Python is a pragmatic language, just like C (I wish I could say that
about Java). It does not necessarily innovate but incorporates things
known to work elsewhere. C and Java have not done anything particularly
unique either. They are included in curricula by their popularity.
Isn''t that a good enough argument?


这篇关于Python有什么独特之处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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