November 11, 2002

Ruby or Python: learn them both

Random
Matthew writes:
Decisions: Should I learn Ruby or Python? I am looking for a scripting language that will allow me to hack-up a few small applications for day-2-day tasks or prototypes. I also want to see if these type of languages can be used in some areas we work in - instead of always writing Java or C++ apps. And the evenings are getting darker...

Learn them both! Seriously, my take on languages is that once you know one, it's very easy to learn another one. The way I learn a new language is by identifying

  • the major differences that require a shift in the mental model about writing programs in that language
  • some of the most used patterns in it

I programmed in a lot of languages including Perl, Python, Scheme, Lisp, XSLT, C, Objective-C, Prolog, JavaScript, Tcl, Java, a bunch of Unix small languages etc. While I may not be able to remember the exact syntax of a particular construction, I do remember the programming style and main ideas of the language, enough so I can go to the reference manual and search for the thing I'm interested in.

I find Python and Ruby to be more expressive and concise than Java, but they may need some time of getting used to. The lack of static typing may be seen as a problem, but in practice I find this to be an advantage.

My dream tool is a Java Web application framework which uses multiple scripting languages to glue or even implement portions of an application. I found most of the Java implementation of popular scripting languages to be as fast as Java, since they get translated to Java bytecodes. But since there's no need to recompile these scripts, writing the code in a scripting language has a lot higher turnaround cycle than the usual edit-compile-run cycle in Java.

Posted by ovidiu at November 11, 2002 07:45 PM |
 
Copyright © 2002-2016 Ovidiu Predescu.