Ask HN: Best partner language for Java -- Python, Ruby, or X?
In August, globalrev wondered what Ruby has that Python doesn't (http://news.ycombinator.com/item?id=283639). I have a related question.
In my day job I am a Java engineer working on enterprise software (I know, I know). I'm considering taking the time to gain expertise in another language that is strong where Java is weak (I currently stumble around in python with decent results).
No offense to language people, but what I care least about is obscure edge cases. I have no pressing plans to do class metaprograming or crazy language-hack magic in general. I do appreciate elegance and simplicity in a language.
I definitely want something stable, widely deployed, with a rich set of functionality/libraries -- thus my initial thoughts of python or ruby.
What language would you recommend? Why?
19 comments
[ 6.5 ms ] story [ 159 ms ] threadThat being said, one thing that you may prefer about Ruby is that its both more OO than Python (you do len(array) in Python and not say array.size) and more functional, so it may be more consistent with your knowledge of Java while exposing you to all the joy of functional programming.
While I'm blabbering, I also suggest you consider learning as many weird languages as you can. I think its usually kind of informative. (I suggest running through a tutorial where you build something in that language so you have a feel for where its strong and weak, and then if you feel extra motivated, coding something up in it.)
That suggests that Python is more orthogonal to Java than Ruby is (er, before I trigger a deep language discussion, I mean much more generally - in terms of application, libraries, userbase, available documentation, examples, etc) - again, it's not something I have hard analysis on, but something I can probably believe anecdotally...
So if you're looking for a "partner" language, then all that would suggest that Python might be a good option (i.e. less overlap == more complimentary).
... That's some pretty rough logic, but maybe something to start with.
The OP should try both for awhile. One striking difference I've found between the two are the communities. There's the python community, the ruby community, and the rails community, and they have vastly different memes and "tenor". One might fit the OP better than another.
I don't know what it's like for Jython, but bugs get fixed fast in JRuby, and help is always available.
If you're into Rails, deployment on Glassfish using warbler looks to be a snap (I've only tried some trivial examples). The seem seems to be true for any Rack-based Web app (though, again, I'm still short on deep experience, and have not gotten satisfactory results for Ramaze yet).
For desktop apps, I (in my strongly biased opinion) think nothing beats JRuby + Swing + Monkeybars.
Python and Ruby have way more in common than the good natured ribbing the two communities give each other might suggest. Besides which, Java/Python is a very employable combination.
Once you've gone a bit further with Python why not try some ruby, then lisp/erlang/ocaml etc. etc. etc.
Simply untrue.
I've never gotten used to python's use of indentation as syntax. The __magical__ method names with double underscore looks just plain ugly. In my opinion Ruby code looks more clean and simple than python.