Wednesday, June 27, 2007

RE: Is Scala the new Groovy?

Well it looks like Alex Blewitt has taken the time to excrete some more complete and utter rubbish all over the blog-o-sphere. Clearly, Alex got screwed over big time by the Geronimo guys and is feeling rather, well, left out and hence has chosen to vent his anger on the projects that James Strachan has participated in. Like Groovy.

His article is a complete and utter joke from start to finish. Where shall we begin. First using his clearly limited knowledge of Groovy he claims that it is interpreted. Here is a wake-up call Alex, no it isn't. Groovy is compiled down to byte-code. In fact its not even some weird proxy-like byte code, a Groovy class is a Java class.

He then claims that you can run Groovy on a "cut-down VM". I mean what planet is this guy on? Groovy runs in the standard VM, Alex. Yeh seriously. He even can't get his JRuby facts straight, calling on all his knowledge to claim JRuby doesn't support all of C Ruby's semantics. I think Charles would have a word to say about that.

He then claims that Groovy doesn't have a presence in the enterprise like Python and er.. Ruby? Alex, seriously, have you been in an enterprise lately? They run Java. No joke. Sometimes you get some C# on the client, but seriously Groovy has plenty of presence and there are multiple success stories on this area. In fact Groovy tends to be "just used", without justification obtained, its just another JAR after all.

He claims the Groovy community has a "not-invented here" syndrome. Listen Alex, I'm quite happy to inform you that we based many of the ideas in Grails on Rails and even some of the ideas in GSP on JSP. It seems to me with your Geronimo-envy that it is you that has the problem.

Next-up, he shifts his all knowing, educated knowledge onto the topic of Scala, claiming its a dynamic language to rule all other dynamic languages. Scala is a great language and together Groovy and Scala are phenomenal additions to a Java programmers toolkit, but Alex Scala is not a dynamic language. You seriously need to do your research before writing such complete nonsense.

Scala is a statically typed language with support for functional programming with anonymous functions and closures as well as type inference. It is not, however a dynamic language nor did the designers ever intend it to be. It also has great support for parallel programming, so if you're a Java programmer check it out, but don't check it out because "it is the new Groovy" as Alex claims as you'll be sadly disappointed.

Just to be clear, for the benefit of Alex, Groovy is a dynamic language that supports meta-programming and a Meta-Object Protocol (MOP) like Smalltalk, Ruby and to a certain extent Python. Scala is a statically typed language that supports functional programming more like Haskell.

In fact I should probably do another Myth #X post and just point it to his blog post with a big sign saying "read this and believe none of it". Hopefully, after a few more blog posts that rip into James' previous projects Alex will have exercised his demons and the blog-o-sphere can return to peace.

12 comments:

AlBlue said...

A few points:

* I didn't say Groovy was interpreted. In fact, it makes no sense to say a language is interpreted or compiled. What I said was Groovy has an interpreter, in fact two: Groovy Shell and Groovy Console. Get rid of both of them, and I won't use the word 'interpeted' around Groovy any more. Note that other languages (like Scala or Haskell) have both compilers and interpreters. A language cannot be described as interpreted/compiled, but an implementation can be.

* JRuby does not support continuations, which (C)Ruby does. This is part of Ruby's semantics. That's not to say it can never have the support, but at present, it doesn't. I really don't see Charles arguing that point; it's on the JRuby page, after all.

* The existence of Java does not imply the existence of Groovy in the enterprise. There are many Java libraries/tools that exist that are not considered production ready; Groovy is at the bottom of that heap in my experience. Your experience is likely to be somewhat biased the other way. I dare say that I'd be much more biased towards Eclipse than (say) NetBeans, but that doesn't imply either one of them is more popular than the other.

* You can run Groovy on a cut-down VM. Harmony provides one such example. Of course, you can't have Groovy programs that execute javax.midi stuff without the Java support behind it, but your Groovy code can execute fine if that package isn't present.

* I did not say Scala was a dynamically typed language. In fact, I didn't say it was a dynamic language at all; I merely compared it. To be honest, it's a bit tiresome having to repeat points that I've already made, but if it keeps you happy, then I'll oblige.

Oh, and just for a laugh, there's a comment about Rails. Ever heard of lift? I like this quote, myself:

For multiple simultaneous requests being made from multiple machines, we're seeing better than 20x performance of the lift code versus the Rails code with 5 Mongrel instances. Once again, the lift code is not using very much CPU and the Rails code is pegging both CPUs.

Neil Bartlett said...

Graeme,

It seems to me that you've twisted what was a fairly complimentary blog entry about Groovy into a scorching attack. It wasn't.

For one thing, the fact that Groovy can run both interpreted and compiled (for certain definitions of the above) is a GOOD thing about Groovy. If you deny it, then you diminish Groovy's usefulness.

Another thing, Alex said that Groovy "can" run on a cut-down JVM. That's another GOOD thing. He didn't say that Groovy "must" run on a cut-down JVM. Again, if you deny this then you diminish Groovy. In effect you're insisting that Groovy must run on the full JVM or nothing. That would be a shame, because presumably it would rule out Java ME platforms such as the CDC/Foundation Profile etc.

Regarding presence in the enterprise... Groovy does not just get used everywhere that Java is used, I'm sorry. Yes it's delivered as "just a jar", but it's also a new language for developers to learn and support etc. Taking that on is not something that any responsible development team does lightly, irrespective of how the powerful the language is.

Finally, I don't think Alex meant to imply that Scala was a dynamically typed language, although his wording could have been better.

Graeme, I really hope you don't take my comment as another attack. Groovy seems to me to be a good language... I'm not very interested in it myself because it's dynamically typed, and in general I believe that statically typed languages like Scala and Haskell are the future. But that's just my opinion.

Regards
Neil

Graeme Rocher said...

@Alex

I work extensively with big corporates, mostly banks, and trust me Groovy is used plenty. The most used languages are Jython and Groovy. JRuby is only starting to have some penetration

Regarding Scala, you're again twisting the truth to try and recover some faith regarding you ignorant post

@Neil

I don't believe we were reading the same article. The post started with "...the cringe-worthy Groovy..". If that is not an attack on Groovy I don't know what is. My attack was not initiated by this one post, but a series of attacks on Groovy by Alex. This is his third of fourth post where he is spreading FUD around Groovy without having the knowledge to backup his facts

AlBlue said...

Graeme,

By your argument, since Scala is just a Jar, is it too is also used extensively in the enterprise?

Secondly, I'd like to reiterate that I never said that Groovy was an interpreted language (the point makes no sense), nor did I say that Scala was a dynamic language or dynamically typed. You read those from a turn of phrase. Nevertheless, I'm happy to reconfirm to everyone here that Scala is a strictly typed language that has type inference, meaning that types don't have to be staticly declared in source code (although they can be).

I'm also happy to accept from the word of a Groovy proponent that Groovy is incapable of running on anything less than a full JVM, and that in no way it works on Harmony if you think that helps your cuase. To be honest, I wonder why you'd want to talk your system down, but Scala is capable of running on such cut-down machines as well as full VMs. It's a shame if this is true that Groovy isn't as flexible in that regard as Scala, but you clearly have more knowledge than me in this area and I'm happy to accept your assertion that Groovy is incapable in this way.

As for being used in the enterprise; neither of us work in the enterprise as a whole; so neither of us can know what everyone does everywhere. I can say that in all of the organisations that I have contact with, I know of none that are using Groovy. It may be that we just move in different circles, and that outside of my experience it's used everywhere, but I suspect that not to be the case.

Of course, if you have examples that you can cite of specific organisations using it for commercial purposes, I'm sure other readers of your blog would be interested. Unfortunately it's a bit difficult to trust someone's assertion that it's used plenty in big corporates without backing it up with facts, especially someone who is in such a biased position such as yourself.

Graeme Rocher said...

I'm glad that you've finally "got it", it clearly took a while for it to sink in for you.

Groovy may well be capable for running on a cut-down VM, but then you should clarify the meaning of cut-down VM because the way you wrote it gave people the perception that Groovy runs in a different environment. I personally have not tried running Groovy in Harmony, but believe people have had success with the Classpath project.

I cannot unfortunately reveal the names of the clients I work with that use Groovy. Scott Hickey has over 70k lines of Groovy code for Mutual of Omaha, a large insurance, hedge funds organisation. Nevertheless I didn't say it was everywhere, merely that Jython and Groovy are the post popular as of this writing given my experience of working with a lot of large corporations.

As for trusting my assertions, well that is up to the readers of my blog and those who know my work and me personally. All I can say is at least I am able to back my assertions up with solid facts and examples that are not merely oppinionated drivel. As I said before, I recommend next time you post you do your research on the languages you are commenting on before making your self look so silly.

AlBlue said...

> I'm glad that you've finally "got it", it
> clearly took a while for it to sink in for
> you.

Got what? I knew all along how Groovy (and Scala) worked. I never claimed otherwise. Unfortunately, you misread what I had said, wrote a fairly large attack on what you thought I said, and now that I've re-iterated from the fourth or fifth time what I've said all along, you now think *I*'ve got it?

As for running on a cut-down VM; it was you who misinterpreted what I had said, not me saying anything incorrect. I don't see that I should be held responsible for your misinterpretations time and time again.

Unfortunately, this whole episode was based on your misinterpretations on what I said, and not what I actually said. We can now put this behind us, and I hope that you don't come back to read my blog again, because it's a waste of my time reading it to you like a bedtime story each time you read it wrong.

Graeme Rocher said...

Wooo.. handbags ;-)

Anonymous said...

Neil :
"It seems to me that you've twisted what was a fairly complimentary blog entry about Groovy into a scorching attack. It wasn't."

I thought the tone was derogatory (e.g. "cringe-worthy groovy").

That may not have been the intention, but it's very, very easy to be misinterpreted in text.

AlBlue said...

The name is pretty cringe-worthy.

Stephan.Schmidt said...

How funny.

Alex: "In fact, compared with other dynamic languages, Scala's general availability and organisation of documentation is quite poor."

Alex: "I did not say Scala was a dynamically typed language. In fact, I didn't say it was a dynamic language at all; "

Peace
-stephan

Unknown said...

Wow.

Graeme, you sure are a bit harsh on Alex.

Granted that he was wrong about almost everything in his blog post, but anyway, the "kid" is trying and is at least spreading interest for thingies like Groovy, Scala and Haskell. That is good.

I made a comment on his blog, trying to educate him a bit; too sad that he makes this into a "miscommunication" or "attitude" problem when facts are so easy to look up. I am not a Groovy expert (although I am a groovy expert), so I can be wrong about certain aspects. I am not wrong about FP, though :-)

To Alex and Neil: an interactive shell does not mean the language is interpreted, although it is often used for interpreted languages (or implementations thereof.) I.e., interactive is not identical to interpretative; the former "just" needs an entry into the runtime environment, which can be made up of compiled entities or interpretative ones (i.e., parsed entities.)

To Alex and Neil: the whole issue of Groovy running on (or being capable of running on...) a limited VM is just silly. The capability of a Groovy script or a Java snippet to run in a limited VM is solely dependent on the constructs and types used. NB: as stated above, I am far from a Groovy guy, so a correction here is welcome, but it seems contradictory to my simple mind, given the bytecode and interoperability with Java that is associated with a Groovy script.

Anonymous said...

It is the shadow of legend Gold which make me very happy these days, my brother says sol gold is his favorite games gold he likes, he usually buy some buy shadow of legend Gold to start his game and most of the time he will win the cheap shadow of legend Gold back and give me some shadow of legend money to play the game.