Python VS Groovy VS Ruby? (Based on Criteria Listed in Question)

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

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

Why are Ruby and Python more suited for programming outside an IDE than Groovy?

I disagree with the assertion that groovy is harder to develop with outside of an IDE. I've done serious python and groovy development, and a little bit of ruby, mostly without an IDE.

While there isn't a pdb style debugger, there's a console: groovysh is a non-GUI console, command line app, and groovyConsole is a GUI with simple syntax highlighting and editing. The rails and TDD philosophies emphasize development with tests rather than debuggers, and I find I rarely, if ever, feel the need to use a full-on debugger if I've got good test coverage. Whether this matters to you really depends on your own style of development.

Groovy simplifies the whole jar/classpath mess. While you can still set the classpath if you want, it's much easier to let groovy manage it entirely. Groovy automatically includes jars in $GROOVY_HOME/lib and ~/.groovy/lib in the classpath. Installing a library is simply copying it there. Better than that, with @Grab, you can declare your dependencies right at the top of your script, and groovy will automatically download the version you specify, and recursively get all of its dependencies and set up the proper classpath and classloaders; it can even manage two libraries that depend different versions of the same jar. Grails also has declarative dependencies.

The groovy language itself is just as concise and flexible as either ruby or python. While you can write it like full-blown Java, groovy can be written to look very similar to ruby.

One valid complaint against groovy vs python and ruby is that the startup time of the JVM is still noticeably worse.

Python vs. Ruby for metaprogramming

There's not really a huge difference between python and ruby at least at an ideological level. For the most part, they're just different flavors of the same thing. Thus, I would recommend seeing which one matches your programming style more.

Dynamic languages - which one should I choose?

Learning Ruby or Python (and Scala to a lesser extent) means you'll have very transferrable skills - you could use the Java version, the native version or the .NET version (IronRuby/IronPython). Groovy is nice but JVM-specific.

Being "better prepared for the future" is tricky unless you envisage specific scenarios. What kind of thing do you want to work on? Do you have a project which you could usefully implement in a dynamic language? Is it small enough to try on a couple of them, to get a feeling of how they differ?

Java Developer looking for a 2nd'ary language to play with

Python almost meets all of them, but I don't know about being "the next big thing", but hey, Google uses it, and I think its popularity is raising.

It's a scripting language, btw.

I use it for web applications (using django), and you can definitely create desktop applications with it (although I haven't done that myself).

It is easy and fun! (although this is quite subjective, but it's tons easier and "funner" than Java)

Using JRuby or Python to call some 3rd party Java libraries - architecture question

I know for a fact that you can call all your Java libraries using JRuby.
You can use the ruby programming language on your front and back end via Rails (Rails is a framework written in ruby).

The difference between MRI (Matz Ruby) and JRuby is that JRuby runs on the JVM, whereas MRI has its own VM which is different from the JVM.

By running on the JVM, you gain access to a whole lot of Java libraries.

Web: When should I consider using Java rather than PHP, Python/Django, Ruby/Rails, etc?

What is the "Best" language is often degrades to an emotional debate rather than practical. Champions of each language are extremely good at making arguments for why each language is the best. I ususally look ata couple of factors:

A) What languages are you and your team confortable with?

B) Is there an existing application/system to be extended or integrated? If so, what languages are most effective for such an integration

C) Are there built in or redily available libararies, components, etc that will allow you to more effectively produce results in one language over another

My decisions almost always boil down to what language/platform is my team going to be most effective on both developming and maintaining.

Advice on which language/Framework to choose for web application?

I'll go ahead and put the word in for django.

Which is sometimes called python's answer to rails.

I've recently had the chance to do some ruby programming and if your coming in new to either language I think ruby or python are pretty easy to step into.

Whatever you pick make sure the tools are well documented.
I haven't looked into rails and ruby enough to be familiar with the documentation available, but I've been pretty impressed with the django and python documentation available.

http://www.djangoproject.com/

http://docs.python.com

Here's a site that lists sites in django, so you can check out what type of sites people are making using django.

http://www.djangosites.org/



Related Topics



Leave a reply



Submit