Python vs Groovy vs Ruby? (based on criteria listed in question)


Considering the criteria listed below, which of Python, Groovy or Ruby would you use?

  • Criteria (Importance out of 10, 10 being most important)
  • Richness of API/libraries available (eg. maths, plotting, networking) (9)
  • Ability to embed in desktop (java/c++) applications (8)
  • Ease of deployment (8)
  • Ability to interface with DLLs/Shared Libraries (7)
  • Ability to generate GUIs (7)
  • Community/User support (6)
  • Portability (6)
  • Database manipulation (3)
  • Language/Semantics (2)
11/3/2008 1:31:49 AM

Accepted Answer

I think it's going to be difficult to get an objective comparison. I personally prefer Python. To address one of your criteria, Python was designed from the start to be an embeddable language. It has a very rich C API, and the interpreter is modularized to make it easy to call from C. If Java is your host environment, you should look at Jython, an implementation of Python inside the Java environment (VM and libs).

11/3/2008 1:44:39 AM

Having worked with all 3 of them, this is what I can say:

  • Python

    • has very mature libraries
    • libraries are documented
    • documentation can be accessed from your debugger/shell at runtime through the docstrings
    • you can develop code without an IDE
  • Ruby

    • has some great libraries ( even though some are badly documented )
    • Ruby's instrospection mechanisms are great. They make writing code pretty easy ( even if documentation is not available )
    • you can develop code without an IDE
  • Groovy

    • you can benefit from everything Java has to offer
    • syntax is somewhat inspired from Ruby
    • it's hard to write code without an IDE. You have no way to debug stuff from your console ( this is something you can easily do in Python/Ruby ) and the available Groovy plugins have a lot of catching up to do. I wrote some apps using Groovy and as they get bigger I regret not going with Ruby/Python ( debugging would have been WAY more easier ). If you'll only develop from an IDE, Groovy's a cool language.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow