版本2和3间的区别
于2020-04-18 12:02:36修订的的版本2
大小: 1570
编辑: czk
备注:
于2020-04-18 12:03:20修订的的版本3
大小: 1749
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 33: 行号 33:

 * [[http://www.linuxjournal.com/article/3882|Why Python]]
{{{
I was generating working code nearly as fast as I could type. When I realized this, I was quite startled.
}}}

I wrote an EMA clone in Python recently. I was asked why Python is more productive than Java after the demo. So I collected some proof from Internet.

    interpreted vs. compiled is a big productivity win for Python/Ruby

    dynamic typing is a big productivity win for Python/Ruby

    Java is way faster than Python or Ruby

    minimal scaffolding is a big productivity win for Python/Ruby. Makes programming more pleasant not to have to build all the infrastructure.

    mostly first class functions a big win for Python/Ruby.

    built-in lists/arrays and hashes/dictionaries a big win over Java [] and library based collections. 

    dynamic code loading in Python/Ruby is a big win. Yes you can do it in Java but again, the cruft.

    No need for set/get methods in Python

    Python has useful constructs Java lacks (Function Objects, Closures, Array and String support, Dictionary Syntax)

    Introspection is easier in Python

A friend of mine who knows nearly all the widely used languages uses Python for most of his projects. He says the main reason is that he likes the way source code looks. That may seem a frivolous reason to choose one language over another. But it is not so frivolous as it sounds: when you program, you spend more time reading code than writing it.

I was generating working code nearly as fast as I could type. When I realized this, I was quite startled.

Why Python is More Productive than Java (2020-04-18 12:32:37由czk编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.