转自Python、Lua和Ruby——脚本大P.K.

Python versus Lua Versus Ruby
Python、Lua和Ruby——脚本大P.K.
Tom Gutschmidt 著
So which of the three languages is the best to use on your project? That depends a great deal on what you want to accomplish. To wrap up the book, I've outlined some of the pros and cons of each language in this section.
这三种语言中的哪一种更合适你的项目?很大程度取决于你想达到什么样的目标。作为一书的结尾,在这一节里,我会描述一下它们各自的优点和不足。
Python Pros and Cons
Python的优点和不足
The pros of Python are as follows:
Python的优点如下:
·         Python has more extension modules than the other languages.
·         Python比其它语言有更多扩展模块。
·         Many online Python tutorials exist. There are also plenty of English books and reference
materials, many sample scripts exist online, and there is a wealth of introductory material. The Python.org Website is a good place to start looking for these because it has sections for beginners, tutorials, guides organized by topic, and lists of links and
references.
·         在网上可以找到很多Python教程。不仅如此,还有大量的英文书籍和资料。Python.org有很多为初学者准备的依主题组织的资料、教程和编程指南,此外还有很多链接和参考。
·         Most folks really enjoy the syntax of the Python language because it appears clean and
is easy to read.
·         很多人都喜欢Python语言的语法,因为它清晰易读。
·         Python has an edge where libraries are concerned. There are many libraries, and, for
the most part, they are well documented.
·         Python在支持库上大占优势,因为它有很多库,而且大部分都有完善的文档支持。
·         Lots of tools that tie into Python are available, and they are often easier to find
than the tools for Lua and Ruby.
·         很多工具可以用于Python,但难以找到适用于Lua和Ruby的。
The cons of Python are as follows:
Python的不足:
·         Existing Python debuggers are considered quirky and slow. Debugging support on Macintosh
and consoles is even weaker.
·         现有的Python调试器诡异而且效率低下。在Macintosh(苹果计算机)和控制台下进行调试是一个梦魇。
·         It can be difficult to bundle Python with other languages. There are lots of binary
DLLs, and Python has (compared to the other languages) a large standard distribution.
·         Python难以与其它语言集成,它有太多的二进制DLL,而且Python带了巨大的标准发布包。
·         Lots of folks really dislike the white space sensitivity of Python syntax.
·         同样的,也有很多人不喜欢Python对空白符敏感的语法。
·         Python can be quite slow at times, as everything is an object on the heap.
·         因为堆上的任何东西都是对象,所以Python有时候会慢得难以忍受。
Lua Pros and Cons
Lua的优点和不足
The pros of Lua are as follows:
Lua的优点:
·         Lua is probably the fastest of the three languages and usually uses the least amount
of runtime memory.
·         Lua在这三种语言中是运行时速度最快而且占内在最少的。
·         Lau has the smallest memory footprint for bundling.
·         集成Lua只会增加极少的内存占用率。
·         The Lau C API is very well documented and has good examples for integrating with C.
·         Lua的C API有着完备着文档和很好的例子,可以容易地通过C集成在软件里。
The cons of Lua are as follows:
Lua的不足:
·         The documentation has improved but is still a bit sketchy overall. Of the three languages,
Lua it is probably the least documented (the API being the exception), with the least amount of code comments. This makes for the largest ramp-up time to learn, and there isn't much in the way of introductory Lua material.
·         尽管Lua的文档已经增进不少,但仍然有所不足。三种语言中,Lua可能是文档最少的(API方面是个例外),因为代码中极少注释,这也增加了学习的难度。另外,对Lua的本质也没有什么介绍。
·         There isn't a lot of built-in functionality for Lua. There is little support if you
need to create a large, complex application.
·         Lua内建的功能很少,并没有对创建大型的复杂应用程序提供足够支持。
·         Lua could use a better garbage collectorthe current development is moving towards that
now. Right now, Lua GC uses a very simple and traditional simple mark and sweep.
·         Lua应该使用更好的垃圾收集机制,Lua现在的GC仍然使用非常简单而且传统的“标记和清除”方式。
Pros and Cons of Ruby
Ruby的优点和不足
The pros of Ruby are as follows:
Ruby的优点:
·         Ruby possesses fairly good advanced debuggers.
·         Ruby有极好的高级调试器。
·         Ruby is object oriented from the ground up, and programmers who are OOP enthusiasts
or who are used to the OOP paradigm will find the language extremely comfortable.
·         Ruby是最彻底的面向对象语言,对于OOP狂热者和惯于使用OOP范式的程序员,他们将会发现Ruby是最适合他们的语言。
·         Ruby has arguably the simplest syntax, with no real rules exceptions. Especially true
for OOP enthusiasts.
·         Ruby的语法极为简单,没有让人出乎意料规则,特别适合OOP行家的习惯。
The cons of Ruby are as follows:
Ruby的不足:
·         Lack of English documentation.
·         英文文档极度缺乏。
·         Fewer existing works and samples for games than with the other languages.
·         与其它语言相比,在游戏方面所作的工作和实例都少得多。

Python、Lua和Ruby——脚本大P.K.的更多相关文章

  1. Python、Lua和Ruby比较——脚本语言大P.K.

    译者按:Python.lua和ruby在C/C++是日渐式微的情况下,在java/.net的围歼中努力抗争的三个当红小生.在Tom Gutschmidt的著作<Game Programmng w ...

  2. Python、Lua和Ruby三大语言脚本哪家强?

    这三种语言中的哪一种更合适你的项目?很大程度取决于你想达到什么样的目标.作为一书的结尾,在这一节里,我会描述一下它们各自的优点和不足.   Python的优点和不足 Python的优点如下: 1. P ...

  3. Python、Lua和Ruby之优劣

    Python.Lua和Ruby之优劣 Python Python的优点:1.Python比其它语言有更多扩展模块.2.在网上可以找到很多Python教程.不仅如此,还有大量的英文书籍和资料.Pytho ...

  4. python为什么叫胶水语言?python为什么是系统脚本?

    python为什么叫胶水语言?python为什么是系统脚本?   特点是什么? python现在最广为闻名的形容大概有这些: 他是很好的胶水语言.什么是胶水语言?反正当时的我不知道. 他是新一代的系统 ...

  5. python字符串操作实方法大合集

    python字符串操作实方法大合集,包括了几乎所有常用的python字符串操作,如字符串的替换.删除.截取.复制.连接.比较.查找.分割等,需要的朋友可以参考下:   #1.去空格及特殊符号 s.st ...

  6. Python 网站后台扫描脚本

    Python  网站后台扫描脚本 #!/usr/bin/python #coding=utf-8 import sys import urllib import time url = "ht ...

  7. 机器学习算法与Python实践之(六)二分k均值聚类

    http://blog.csdn.net/zouxy09/article/details/17590137 机器学习算法与Python实践之(六)二分k均值聚类 zouxy09@qq.com http ...

  8. 转:python常用运维脚本实例

    python常用运维脚本实例 转载  file是一个类,使用file('file_name', 'r+')这种方式打开文件,返回一个file对象,以写模式打开文件不存在则会被创建.但是更推荐使用内置函 ...

  9. python常用运维脚本实例【转】

    file是一个类,使用file('file_name', 'r+')这种方式打开文件,返回一个file对象,以写模式打开文件不存在则会被创建.但是更推荐使用内置函数open()来打开一个文件 . 首先 ...

随机推荐

  1. DTrace to Troubleshoot Java Native Memory Problems

    How to Use DTrace to Troubleshoot Java Native Memory Problems on Oracle Solaris 11 Hands-On Labs of ...

  2. QuaZip实现多文件打包

    项目需求: 在Goldenfarm客户端中当用户选择了本地场景文件,并进行本地场景文件分析后会产生分析结果,分析结果主要包括:贴图纹理.可渲染层等,其中贴图纹理指出了在场景文件中使用到的贴图或其它文件 ...

  3. NDK开发之数组操作

    JNI把Java数组当作引用类型来处理,JNI提供了必要的函数来访问和处理Java数组. 下面一个一个来看. 1.创建数组 我们可以使用NewArray函数在原生代码中创建数组实例,其中可以是Int. ...

  4. 【原】个人对win7开机黑屏只有鼠标排障总结

    个人对win7开机黑屏只有鼠标排障总结 文:铁乐猫 第一种情况是explorer.exe进程丢失或损坏有关: 判断方法是按Ctrl+Alt+Del键能呼出任务管理器,结束explorer.exe进程, ...

  5. css hack方法总结

    IE6识别:下划线 _ 和 星号 *IE7识别:星号 *IE6-IE10识别: \9 css hack方式,条件注释法<!--[if IE]>这段文字只在IE浏览器显示<![endi ...

  6. php strtotime函数服务器和本地不相同

    遇到过一种情况strtotime 在本地和服务器不相同 服务器返回的是-1 strtotime($sa_sagyo_ymd."23:59:59") 如果这样用不了,就只能换一种写法 ...

  7. web 自定义监听器中设置加载系统相关的静态变量及属性

    直接上代码: 在src下新建一个StartListener 实现接口ServletContextListener,: /** * @Title:StartListener.java * @Packag ...

  8. c++ 中关于int,unsigned int , short的关系与应用

    转载:http://www.cppblog.com/xyjzsh/archive/2010/10/20/130554.aspx?opt=admin   int类型比较特殊,具体的字节数同机器字长和编译 ...

  9. android-satellite-menu

    使用过Path的人都应该知道,在Path主界面的左下方有一个非常有意思的菜单.菜单由一个主按钮组成,当用户点击该按钮时,就会有一连串的按钮弹出,而Satellite Menu正是该菜单的一个开源版本. ...

  10. sql 删除表数据truncate delete drop的区别

    已下内容为转载内容:学习之用 1.truncate和不带where子句的delete.以及drop都会删除表内的数据. 2.drop.truncate都是DDL语句(数据定义语言),执行后会自动提交. ...