這篇好笑(難笑?!)的文章唯一跟Python有關的部份是跟使徒聖彼得對話的這段:
比較了 Python, Perl, PHP, Ruby 等語言上主要網頁框架的效能
Test: * CodeIgniter on PHP * Catalyst on Perl * Django on Python * RubyOnRails on Ruby * Symfony on PHP * TurboGears on Python
# Django has won over the nearest competitors with the approximate triple superiority. # Second and third places have divided TurboGears and RoR 1.1.6, because they are equally fast, but behave differently at different loads, overtaking each other. RoR 1.2.1 falling of productivity in 2-4 times in comparison with 1.1.6 version.
個人覺得長久以來的開發方式對比輕量框架開發, 就好像要花數十年苦功才有成的中國功夫對比相對速成的空手道...又或使用有關鍵字加亮的文字編輯器對比使用所見即所得的 Dreamweaver.
不過說要學個語言不是那麼容易,雖然說比起英語德語加法語來說,學個程式語言比較起來容易太多了,可是沒有個入門文件也是不行的。上網一查「Python」,結果台灣陣亡,第一頁最有用的就是第一筆: Python 教學文件。這可以位在香港的,看來我以前沒學 Python 也不能怪自己,資源少的可憐的感覺,隨隨便便要找個論壇都還來個 404 。
自己推一下,做個記錄。
裡面有 java, ruby, c, python 四種語言各自的語法關係圖(respective grammar dependency graphs)連結 , 拿最近熱門的 Java+Ruby 結合體 JRuby 來和效能強 n 倍的CPython 說嘴 XD
90% of Python and Ruby code would be identical. Two areas where the two languages do diverge quite drastically is on the topic of metaprogramming and also the idea of explicit over implicit. In Ruby, metaprogramming (programs that write programs) is embraced, while in Python it is seen as something to be avoided for the most part, in favor of code simplicity and readability. This follows the Ruby philosophy of TIMTOWTDI (there is more than one way to do it), versus Python's "there should be one obvious way to do it". Ruby's open-endedness on this is nice in some regards.
雖然現在 Ruby 語言非常熱門, 不過本文作者卻在使用 Rails 開發幾個專案後又轉而使用 Python 的網頁框架, 最終選用 python 語言的原因有執行速度, 語言本身的支援, 方便的函式庫, 還有因為Ruby/Python 不同的編程哲學所造成的程式可讀性(可維護性)差異.
聊舉數例,約略可窺見動態型別語言不再只是次等公民,已引起主流陣營的正視。不管你喜不喜歡動態型別,你都該正視這個現象或者趨勢。