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 ConsPython的優點和不足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 ConsLua的優點和不足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 RubyRuby的優點和不足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.· 與其它語言相比,在遊戲方面所作的工作和執行個體都少得多。