Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)
like image 614
Prembo Avatar asked Nov 03 '08 01:11

Prembo


People also ask

Is Groovy better than Python?

Python still gains the upper hand when it comes to explicit syntax and thus is more readable, whereas Groovy is concise, fast and easy to set up. Python is a preferred language among data scientists, especially for machine learning, whereas Groovy is ideal for object-oriented programming.

What is the difference between Python and Groovy?

Python is a high level, general purpose programming which supports both procedural and object-oriented programming concept. Groovy is an object-oriented programming language which is Java-syntax-compatible and Python-based the general-purpose it is used as a scripting language for java.

Is Ruby close to Python?

Ruby is a server-side scripting language, so it is very much similar to Python and PERL. Ruby language can be used to write Common Gateway Interface (CGI) scripts. It has a similar syntax to that of many programming languages like Perl and C++.

Should I use Python or Ruby?

Python is generally better for educational use or for people who want to build quick programs rather than work as developers, while Ruby is better for commercial web applications. There are more specific differences when comparing Ruby versus Python, and they have in common that there are many ways to learn both.


2 Answers

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).

like image 200
Ned Batchelder Avatar answered Sep 22 '22 23:09

Ned Batchelder


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.
like image 36
Geo Avatar answered Sep 21 '22 23:09

Geo