寻找最好的脚本语言, [英] Searching for the best scripting language,

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

问题描述

我们是否通过Python彩色眼镜看脚本世界?

Python脚本开发时已经在睡觉了吗?b
语言已经通过我们的Pythonista's ?


星期六,Slashdot在最佳上发表了这篇文章。脚本

语言。
http://developers.slashdot.org/devel...id=126&tid=156


"在Scriptometer的人们进行了一项实用的调查,其中最好的是b $ b脚本语言。虽然这样的问题必然会在通常的Perl与PHP,Python与Perl之间产生火焰战争,
VBScript与所有人群之间的关系,Scriptometer调查是切实可行的:

如果我必须写一个脚本,我必须快速编写它,它必须是小b $ b(更少打字),它应该允许我通过一个自己调试/>
调试器或只是详细的输出模式。嘘,Perl和Ruby赢得了

比赛,并且差距为1-2分,他们基本上并列第一名......有趣的是ICFP比赛

最近宣布OCaml成为快速发展的赢家。


Scriptometer网站:
http://merd.sourceforge.net/pixel/la...ting-language/


毋庸置疑,Ruby网站今天是Slashdot-ed。


关于

易用性和Python语言之美?


或者我应该将我的代码库转换为Ruby和OCaml? :)


让狂热者捍卫Python火焰开始了!


- RJ

解决方案

大家好


Richard James写道:

关于使用的易用性和Python语言之美,Scriptgraph调查遗漏了哪些内容?




好​​吧,再看看Guido的教程,因为它读起来很开始:


"""

如果你曾经写过一个大型的shell脚本,你可能知道这种感觉:

你会喜欢添加另一个功能,但是它已经很慢了,所以

很大,而且很复杂;或者该功能涉及系统调用或其他

功能,只能从C获取

"""


页面完全错过了比任何shell中通常使用的更复杂任务的处理(嘿,这些例子甚至可以用DOS批处理文件实现
:-p )。 Python可能不是第一选择

用于测试文件是否可读,但问问他们为什么Fedora为他们的Anaconda OS安装程序而不是shell脚本选择了
Python ......


-Markus


Richard James写道:

我们是通过Python彩色眼镜看脚本世界?
Python脚本开发时是否正在沉睡,而脚本语言世界已经通过了我们的Pythonista's?

周六Slashdot跑了这篇关于最佳的文章脚本
语言。
http://developers.slashdot.org/devel...id=126&tid=156
在秘书计上的人们进行了实际的调查脚本语言是最好的。




实用调查总是像实际编程一样热闹,除非他们的意思是睡着了。其中一个简单的,毫无疑问是b / b $ b这个调查的基础,总是这样:我在哪种情况下
必须键入最少数量的字符。对于没脑子的人来说,这是对卓越编程的有效测试。希望不是所有在b
世界的程序员都已经减少到如此无脑。


On Sun,2004年6月13日13:34:43 - 0700,理查德詹姆斯写道:

"侦察员中的人们对哪种脚本语言最好进行了实际调查。虽然这样的问题必然会在通常的Perl vs PHP,Python vs Perl,VBScript与所有人群之间产生火焰战,但是Scriptometer调查是切实可行的:
如果我必须写一个脚本,我必须快速写它,它必须小(打字少),它应该允许我通过
调试器调试自己或只是详细的输出模式。 sh,Perl和Ruby赢得了比赛,并且差距为1-2分,他们基本上并列第一名......有趣的是ICFP比赛最近宣布OCaml为冠军对于快速开发。

关于Python语言的易用性和美观性,有什么要点缺少Scriptometer调查?

或者应该我将我的代码库转换为Ruby和OCaml? :)



我最近学到了红宝石,只是出于好奇。既然我知道了,我就不再使用python编写任何shell实用程序了。对于几乎所有简单的管理任务,Ruby都是更好的选择。对于较大的程序,

有时候python似乎是更好的选择。 Python强制执行

一致性和可读性。在很多人长时间使用相同代码的环境中,

python的好处变得明显。这并不是说ruby * cant *可以用在

这样的情况中。如果ruby程序员为关于样式和方法的

项目制定了严格的指导方针,那么它将同样有效。


证据来源于此。这是我写的ruby程序的一部分。这个

片段实际上只是一个行。我把它分成了几行,因为

略微提高了可读性。这条单线可能需要花费最多15行才能在python中完成,如果你想这样做可能会更多。

智能化。


[" * .rar。*"," * .r [0-9] [0-9]。*"]。每个{| fn |

Dir

Are we looking at the scripting world through Python colored glasses?
Has Python development been sleeping while the world of scripting
languages has passed us Pythonista''s by?

On Saturday Slashdot ran this article on the "best" scripting
languages.
http://developers.slashdot.org/devel...id=126&tid=156

"Folks at the Scriptometer conducted a practical survey of which
scripting language is the best. While question like that is bound to
generate flamewars between the usual Perl vs PHP, Python vs Perl,
VBScript vs everything crowds, the Scriptometer survey is practical:
if I have to write a script, I have to write it fast, it has to be
small (less typing), it should allow me to either debug itself via a
debugger or just verbose output mode. sh, Perl and Ruby won the
competition, and with the difference of 1-2 points they were
essentially tied for first place... Interesting that ICFP contests
lately pronounced OCaml as the winner for rapid development."

Scriptometer site:
http://merd.sourceforge.net/pixel/la...ting-language/

Needless to say, the Ruby site was Slashdot-ed today.

What points are the Scriptometer survey missing, in regards to the
ease of use and beauty of the Python language?

Or should I convert my code base to Ruby and or OCaml? :)

Let the rabid "in defense of Python" flames begin!

-- R.J.

解决方案

Hi everybody

Richard James wrote:

What points are the Scriptometer survey missing, in regards to the
ease of use and beauty of the Python language?



Well, better look again at Guido''s Tutorial, as it reads at the very
beginning:

"""
If you ever wrote a large shell script, you probably know this feeling:
you''d love to add yet another feature, but it''s already so slow, and so
big, and so complicated; or the feature involves a system call or other
function that is only accessible from C
"""

The page misses completely the handling of more complex tasks than those
typically used in any shell (hey, those examples could even be realized
with a DOS batch file :-p). Python might not be the number one choice
for testing whether a file is readable, but ask them why Fedora has
chosen Python for their Anaconda OS Installer and not a shell script...

-Markus


Richard James wrote:

Are we looking at the scripting world through Python colored glasses?
Has Python development been sleeping while the world of scripting
languages has passed us Pythonista''s by?

On Saturday Slashdot ran this article on the "best" scripting
languages.
http://developers.slashdot.org/devel...id=126&tid=156
"Folks at the Scriptometer conducted a practical survey of which
scripting language is the best.



"Practical surveys" are always as hilarious as practical programming, unless
one is asleep to their implications. One of the simple ones, which no doubt
formed much of the basis of this survey, always is: in which situation do I
have to type the least number of characters. For the brainless, this is a
valid test of programming excellence. Hopefully not all programmers in the
world have been reduced to such brainlessness yet.


On Sun, 13 Jun 2004 13:34:43 -0700, Richard James wrote:

"Folks at the Scriptometer conducted a practical survey of which
scripting language is the best. While question like that is bound to
generate flamewars between the usual Perl vs PHP, Python vs Perl,
VBScript vs everything crowds, the Scriptometer survey is practical:
if I have to write a script, I have to write it fast, it has to be
small (less typing), it should allow me to either debug itself via a
debugger or just verbose output mode. sh, Perl and Ruby won the
competition, and with the difference of 1-2 points they were
essentially tied for first place... Interesting that ICFP contests
lately pronounced OCaml as the winner for rapid development."
What points are the Scriptometer survey missing, in regards to the
ease of use and beauty of the Python language?

Or should I convert my code base to Ruby and or OCaml? :)

I recently learned ruby, merely out of curiosity. Now that I know it, I
dont write ANY shell utilities with python anymore. Ruby is a much better
choice for almost all simple administrative tasks. For larger programs,
there are times when python seems like a better choice. Python enforces
consistency and readability. In an environment where many people will be
working on the same code for an extended period of time, the benefits of
python become apparent. That isnt to say that ruby *cant* be used in
situations like that. If ruby programmers layout strict guidelines for a
project regarding style and methodology, it would be just as effective.

The proof is in the source. This is part of a ruby program I wrote. This
snippet is actually a single ''line''. I broke it into several lines for
slightly improved readability. This single line would probably take at
least 15 lines to do in python, probably more if you wanted to do it
intelligently.

["*.rar.*", "*.r[0-9][0-9].*"].each {|fn|
Dir


这篇关于寻找最好的脚本语言,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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