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.

5-10 times productivity (really!)

How much more productive? The most widely accepted estimate is 5-10 times. On the basis of my own personal experience with the two languages, I agree with this estimate.

In my personal estimate, I spend 5 times as much time fixing such errors (omitting or duplicating control characters) in Java as I do in Python. It really cuts into your productivity — and your creative energy — when you spend that much of your time just trying to satisfy the compiler.

language_productivity.png

program_time.png

    One is that Python requires a lot less typing.

    Another source of productivity is Python's powerful built-in data types.

    Planning is good and bad. If you know where you're going, planning is good. If you don't know what you'll encounter on the way, you should be more open-minded and improvisational. I certainly see a place for planning, but if the language forces you to plan everything, there may be trips you'll never undertake because it would require too much thinking ahead.

django_aspnet.png

And more references:

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

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