-
Website
http://blog.dhananjaynene.com -
Original page
http://blog.dhananjaynene.com/2008/09/commentary-on-python-from-a-java-programming-perspective/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
washort
1 comment · 1 points
-
danfairs
1 comment · 1 points
-
cheftony
1 comment · 3 points
-
Paddy3118
2 comments · 3 points
-
dipankarsarkar
1 comment · 1 points
-
-
Popular Threads
It's quite interesting to read others' experiences.
You may be interested in a tutorial I gave in 2007 at PyCon and OSCON, "Code Like a Pythonista: Idiomatic Python". Full notes here: http://python.net/~goodger/projects/pycon/2007/...
Nice tutorial and great references as well.
Thanks.
Dhananjay
nice article.I am also learning ruby although i am a java developer just for fun.
Thanks
prashant
http://www.prashantjalasutram.blogspot.com
You don't give any specific examples of where you found CPython to be slow (for some definition of slow), but I'd be interested to see sample code, benchmarks, and perhaps a run on Jython as well.
I spend around 50% of my time in C# (whose tools have similar refactoring capabilities to IDEs such as Eclipse), and the rest in Python. While my development environment for Python (TextMate or emacs) certainly don't have refactoring tools like Visual Studio exposes (and I suspect whatever your chosen Java IDE is also does) I've found that I simply don't need them; a search and replace answers 80% of the common cases. Can you give an example of a refactoring operation that you do with your Java tools that you missed with the Python tools?
It's probably worth mentioning that Python does have high-quality IDEs (Wing springs to mind). These may offer refactoring tools.
While I have conducted benchmarks on at least 10 occasions, I haven't kept records of the same. However the one time I did maintain detailed records, I documented these here : http://blog.dhananjaynene.com/2008/07/performan... , it includes a benchmark on CPython, Jython and psyco as well. I will stand by my assertion that there is indeed a substantial difference in run time performance on most counts.
An example of tough refactoring is changing the method name in a scenario where the method is being used in a class hierarchy.
One neat thing about Python is that if you have performance bottlenecks, you can drop down into C/C++ code to rewrite just those parts of your system that have problems. How come you don't see this approach as viable as simply writing the whole application in Java instead of Python with some parts rewritten in C?
I concur it is indeed a viable approach and that it is possible that I could
choose to exercise that optiion as well. I think it will indeed depend on
the nature of the application and its distribution model. I would think that
if the application hotspots are fairly localized and if it is intended to be
used in few installations, then using C/C++ indeed becomes a attractive
option.
Dhananjay