有关Python的问题,更多关于清晰度。 [英] Question about Python, more about clarity.

查看:64
本文介绍了有关Python的问题,更多关于清晰度。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白或不清楚我应该说,一些人怎么能认为Python是一种脚本语言?特别是JAVA人群。

除非我的理解是关闭的,并且我可以通过谷歌搜索收集,是否b / b
将Python隐式编译成字节码然后读入

解释器,并且在JAVA中你必须明确编译才能解释,它们都有虚拟机,所以为什么这样的标签就有了

几乎没有变化?


我已经使用Python 3年了,喜欢它,而JAVA只有几个月b $ b个月(对于学校),并且讨厌它。这不是咆哮或任何事情,我只是想要澄清。$ / b

非常感谢任何见解。


Adonis

What I do not understand, or not clear to me I should say, is how can some
people regard Python as a scripting language? In particular the JAVA crowd.
Unless my understanding is off, and from what I can gather from googling, is
that Python is compiled implicitly into bytecode then read into the
interpreter, and in JAVA you must compile explicitly before it is
interpreted, both have virtual machines, so why such a label since there is
barely any variance?

I have been using Python for 3 years now, love it, and JAVA just a few
months (for school), and hate it. This is not a rant or anything, I just
want to clarify.

Any insight is greatly appreciated.

Adonis

推荐答案

Adonis写道:
我不明白,或者不清楚我应该说,一些人如何将Python视为脚本语言?特别是JAVA的人群。
除非我的理解是关闭的,并且我可以从谷歌搜索中收集,是否Python被隐式编译成字节码然后读入
解释器,并在JAVA中你必须在它被解释之前明确地编译,它们都有虚拟机,所以为什么这样的标签因为几乎没有任何差异?
What I do not understand, or not clear to me I should say, is how can some
people regard Python as a scripting language? In particular the JAVA crowd.
Unless my understanding is off, and from what I can gather from googling, is
that Python is compiled implicitly into bytecode then read into the
interpreter, and in JAVA you must compile explicitly before it is
interpreted, both have virtual machines, so why such a label since there is
barely any variance?




关于这一点已经有很多过去的讨论了,如果你在搜索档案中,你肯定会找到比你更关心的更多信息

来阅读它。你在这里收到的任何回复,包括

mine,都已经说过了,可能还有更充分的回复。


摘要:脚本编写对不同的人来说意味着不同的东西,

和那些Python的几个定义_是一个脚本

语言。它也是一种通用语言,就像Java一样,

并且可以用于非常广泛的目的(也许比bb更广泛地使用
,但这是另一场辩论。一些

的人使用脚本编写主要是在一种贬义的意义上,和这些人一起参与讨论这种理性,这是毫无意义的浪费时间。换句话说,

它变成了宗教问题。 ;-)


-Peter



There have been many past discussions about this, and if you
search the archives you will surely find more than you care
to read about it. Any responses you receive here, including
mine, have been said before and probably more fully at that.

Summary: "scripting" means different things to different people,
and for several definitions of that Python _is_ a scripting
language. It''s also a general purpose language, as is Java,
and can be used for a very wide range of purposes (and perhaps
even more widely than Java, but that''s another debate). Some
people use "scripting" primarily in a derogatory sense, and
with such people involved it''s sort of a pointless waste of
time to attempt to discuss this rational. In other words,
it becomes a matter of religion. ;-)

-Peter


在过去的几年里,人们已逐步成为

对术语脚本不满意语言。有一段时间敏捷

语言似乎是一个角色,但我认为动态语言是

现在结果是首选术语。请参阅David Asher关于动态语言的优秀论文

http://activestate.com/Corporate/Pub..._Languages.pdf


最近,我的团队需要为标准脚本编写编写包含

建议的文档语言。但我们改变了

,以推荐动态消息。语言。


这是来自背景。该文件的一部分。


================================= ==============


动态语言已经存在(在各种标签下:命令

语言,脚本语言,胶水语言,宏语言)长期

因为有计算机操作系统和编程

语言。每个操作系统都需要一种方法来告诉它执行

基本操作,例如运行应用程序,复制和

删除文件等等。这是第一代

代动态语言的功能,通常称为命令语言。

命令语言的类别。包括IBM系统上的JCL,cmd文件,CLISTS,

和REXX; MS-DOS上的批处理文件;和shell脚本
UNIX上的
语言。这些语言的功能集非常有限,而且b $ b开发人员很快发现他们需要更强大的语言。


命令语言演变成第二代语言,

通常称为脚本语言或胶水语言(因为它们通常用于脚本或粘合应用程序

一起用于执行业务功能)。添加了脚本语言

支持变量,控制流构造和参数化

函数。尽管脚本语言比早期的命令语言有所改进,但它们仍有很大的局限性。

大多数缺乏面向对象和模块化的功能,而且

访问数据库和管理图形用户的功能

接口(GUI)。它们通常是专有的,仅限于特定的操作系统,这限制了可移植性和

可共享性。


脚本语言继续进化,生成第三代

极其强大的语言,其中包含了许多重要的技术进步:支持模块化,

面向对象,GUI和数据库访问。随着这些进步,

这些语言变得足够强大,可以用于应用程序开发和脚本编写,并且开发人员开始使用它们来构建中型

甚至是大规模的应用程序。术语脚本语言是指脚本语言。 ?

不再描述这些语言的范式用法?

逐渐被术语动态语言所取代。动态语言的

技术定义是一种使用动态类型而不是静态类型的语言。在静态类型的
语言中,变量的类型(例如字符串,整数)必须是

才能使用变量。在动态类型的
语言中,不需要声明变量;变量通过赋值语句获取其类型,并且其类型可能会在执行程序期间发生变化。
Over the last couple of years, people have become progressively
unhappy with the term "scripting" language. For a while "agile"
language seemed like a comer, but I think that "dynamic" language is
now turning out to be the preferred term. See David Asher''s really
excellent paper on dynamic languages at

http://activestate.com/Corporate/Pub..._Languages.pdf

Recently, my group needed to write a document containing
recommendations for standard "scripting" languages. But we changed
that to recommendations for "dynamic" languages.

This is from the "Background" section of that document.

===============================================

Dynamic languages have existed (under a variety of labels: command
language, scripting language, glue language, macro language) as long
as there have been computer operating systems and programming
languages. Every operating system needs a way to tell it to perform
basic operations such as running application programs, copying and
deleting files, and so on. This was the function of the first
generation of dynamic languages, usually called command languages.
The category of "command languages" includes JCL, cmd files, CLISTS,
and REXX on IBM systems; batch files on MS-DOS; and shell scripting
languages on UNIX. These languages had very limited feature sets, and
developers quickly found that they needed more powerful languages.

Command languages evolved into a second generation of languages,
generally called scripting languages or glue languages (because they
were typically used to "script" or "glue" application programs
together to perform business functions). Scripting languages added
support for variables, control-flow constructs, and parameterized
functions. Although scripting languages were an improvement over the
earlier command languages, they still had significant limitations.
Most lacked object-oriented and modularization features, and
capabilities for accessing databases and managing graphical user
interfaces (GUIs). They were typically proprietary and restricted to a
particular operating system, which limited portability and
shareability.

Scripting languages continued to evolve, producing a third generation
of extremely powerful languages that incorporated a number of
important technical advances: support for modularization,
object-orientation, GUIs, and database access. With these advances,
these languages became powerful enough for application development as
well as scripting, and developers began to use them to build mid-sized
and even large-scale applications. The term "scripting language" ?
which no longer describes the paradigmatic use for these languages ?
is gradually being superceded by the term dynamic language. The
technical definition of a dynamic language is a language that uses
dynamic typing rather than static typing. In a statically-typed
language, the type of a variable (e.g. string, integer) must be
declared before the variable can be used. In a dynamically-typed
language, variables do not need to be declared; a variable acquires
its type via an assignment statement, and its type may change during
the execution of the program.


Stephen Ferg< st *** @ ferg.org>写道:
Stephen Ferg <st***@ferg.org> wrote:
命令语言的类别包括IBM系统上的JCL,cmd文件,CLISTS,
和REXX; MS-DOS上的批处理文件;和shell脚本在UNIX上的语言。这些语言的功能集非常有限,并且
The category of "command languages" includes JCL, cmd files, CLISTS,
and REXX on IBM systems; batch files on MS-DOS; and shell scripting
languages on UNIX. These languages had very limited feature sets, and




* WHOA *!这对REXX来说是一个很大的伤害 - 它是一个优秀的VHLL,

无法与.BAT,JCL或sh相媲美。我把它广泛用于

原型开发一般程序,专注于文本处理,当我在IBM研究中获得
时 - 经常发现我不需要在(例如)Pascal / VS或PL / I中重写

原型,因为它已经完成了工作

(很像APL用于原型化数值/矩阵计算:经常我需要在完成后重写Fortran中的程序。


我可以说我对VHLL的爱,最终加冕为找出关于Python的
,在80年代早期开始使用REXX - 看到它很痛苦

以这种方式受到谴责!


((我已经通过邮件向David发送了这份副本,以防他想

进入这场辩论;-))

Alex



*WHOA*! This does REXX a great disservice -- it was an excellent VHLL,
in no way comparable to .BAT, JCL, or sh. I used it extensively for
prototyping general programs, focusing on text-processing, back when I
was in IBM Research -- and often found that I didn''t need to rewrite the
prototype in (say) Pascal/VS or PL/I, because it already did the job
(much like APL for prototyping numerical/matrix computations: often I
_didn''t_ need to rewrite the program in Fortran when it was done).

I could say that my love for VHLLs, eventually crowned by finding out
about Python, started in the early ''80s with REXX -- it hurts to see it
impugned in this way!

((I''ve sent a copy of this to David by mail, just in case he wants to
enter this debate;-))
Alex


这篇关于有关Python的问题,更多关于清晰度。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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