Why should i use python if i can use java
anamax at earthlink.net
Thu Jun 7 12:50:30 EDT 2001
> I'm just completing my first significatn project in python (previously
> worked in Java). Productivity gain in python has been significant.
> However, python doesn't
> strong typing (love it or hate it...)
> interfaces (ditto)
> an elegant way of implementing singletons (or does it? anyone?)
> a comparable development and debugging environment to JBuilder
Umm, I'm confused. Are you saying that python isn't good/better
because it lacks those things or that Python would be even better
if it did? The former is contradicted by your experience while
the latter is open to debate.
Other people have commented/will comment on interfaces, singletons,
and good development/debugging environments, so after an aside on
typing (dynamic typing is required for truely useful polymorphic
programming, so that typing "a+b" once is reusable), I'll take a
contrary view wrt development and debugging.
I've found that "good" (beyond print/grep) debugging/program development
environments actually decrease "functionality provided" productivity.
(They do seem to increase "lines of code generated" and "% of time
spent typing" productivity.) The reason seems to be that "good"
environments let me/other people write code that is surprising, that
can only be understood through the use of such tools. (Of course,
you can always add user-side hacks when the behavior doesn't match
the documentation, pushing a bigger hairball to the next person.) Without
those tools, me/they have to walk away from the keyboard and figure
out what the problem actually is. It turns out that "figure out" is
more productive than "tools required".
It took me a while to figure this out.
> So it still lags Java for seriously scalable enterprise solutions and
> for portable device deployment.
Umm, don't confuse "java environments for accomplishing <goal>" with
"required environments for accomplishing <goal>". Both of those
things are done perfectly well without Java. (Of course, certain
decisions might preclude the use of certain technologies.)
We're about to see whether "write once, run anywhere" will survive
"write anything, works together".
ps - For those of you with a historical bent, remember when Common Lisp was
way too big? Guess what's smaller - Java (as deployed) or CL (including
a compiler, bignums, ...).
More information about the Python-list