tag:blogger.com,1999:blog-4704664917418794835.post3802117822408733532..comments2023-07-01T05:41:30.469-07:00Comments on Headius: Groovy in Ruby: Implement Interface with a Mapheadiushttp://www.blogger.com/profile/15717357218364947795noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4704664917418794835.post-10898374894565134562007-12-05T18:41:00.000-08:002007-12-05T18:41:00.000-08:00"On line 6, we coerce our Hash into an Iterat..."On line 6, we coerce our Hash into an Iterator instance (and we could have imported Iterator above to avoid the long name)."<br><br>By imported, you meant included, right? :-)konradnoreply@blogger.comtag:blogger.com,1999:blog-4704664917418794835.post-37605139822177489542007-12-06T14:44:00.000-08:002007-12-06T14:44:00.000-08:00"Now if you ask the Groovy team, they'll ..."Now if you ask the Groovy team, they'll make some claim like "it's all Java objects" or "Groovy integrates seamlessly with Java" but neither of those are entirely true."<br><br>Honestly Charles I don't know why you bother. It's a silly argument. To argue that Groovy is as far removed from Java as Ruby (or JRuby in this case) is, is only an opinion shared with other Ruby wannabees.<br><br>You seem to be like those people (few though one would hope they to be) who use J++ on .NET. Why bother? Just use C# and be done with it! Move on!<br><br>I don't understand this shoehorning of Ruby into Java. The languages are vastly different, even if at just a purely syntactic. Groovy on the other hand is vastly more similar. I barely break stride switching between the two. I can definitely not say the same about looking at your Ruby code in this article. (Not knocking Ruby since I read enough about how people love it. But it is very different to Java or Groovy). <br><br>Just make the complete move to Ruby... on Ruby (i.e. not Java) and I'm sure you'll be a happier man for it.Darryl Pentznoreply@blogger.comtag:blogger.com,1999:blog-4704664917418794835.post-11992788926375014052007-12-09T11:11:00.000-08:002007-12-09T11:11:00.000-08:00Ola,"Finally, it's interesting to see thi...Ola,<br><br>"Finally, it's interesting to see this black-or-white approach. "If you wanna use Ruby, you damned well better keep away from Java. YOU CAN'T HAVE BOTH."... Or can I?"<br><br>If I gave the impression I was jealously guarding the Java runtime from Rubyists, then I miscommunicated. By all means have at it. Personally it doesn't matter to me in the slightest. I have to say that for some reason I'm not as disgruntled about Java (the language) as some seem to express. However, certainly, there are very obvious and enjoyable benefits to the terseness of Groovy, so I embrace those benefits wholeheartedly. Which was my point. To me Groovy kinda slots in more naturally alongside Java, than Ruby does. I like the fact that I can easily include Java code in Groovy without even breaking stride. Since Groovy fairly closely follows Java in syntax it is a more intuitive DSL partner to Java for me.<br><br>I must admit I get tired of hearing how much better Ruby is to Java, yet in my humble yet Ruby-ignorant point of view, I struggle to see these benefits when comparing some of the examples. My subjective opinion is that Groovy is generally more 'readable' than Ruby code. The syntax is a context switch for me away from Java.<br><br>So perhaps what would be useful is for somebody like yourself or Charles to illustrate these significant differences with some practical comparisons demonstrating why Ruby is so much better than Groovy. I don't deny my Ruby ignorance, so it would be instructive to see practical examples rather than bold (but unsubstantiated) claims.Darryl Pentznoreply@blogger.comtag:blogger.com,1999:blog-4704664917418794835.post-23852065513041859792007-12-09T11:51:00.000-08:002007-12-09T11:51:00.000-08:00Whoops, I meant to say "how much better Ruby ...Whoops, I meant to say "how much better Ruby is to Groovy" in the post above, and "The Ruby syntax is a context switch away from Java for me."<br><br>I blame these silly little textarea's that blogger provides for comments. Makes you lose track of your edits. :)Darryl Pentznoreply@blogger.comtag:blogger.com,1999:blog-4704664917418794835.post-70223165606539394932007-12-09T12:56:00.000-08:002007-12-09T12:56:00.000-08:00Well that's your choice I guess. But perhaps i...Well that's your choice I guess. But perhaps it proves my point. Ruby:Groovy - tomaytoe:tomahtoe.<br><br>The differences between Ruby and Groovy (syntactically - not behind the covers) are according to you so negligible it really just comes down to taste.<br><br>Which brings me back to my original point. As somebody who has found Groovy to be a really natural and intuitive complement to Java due to its syntactic and API similarities (I don't care what's going on in the compiler unless it noticeably affects performance) I still don't see the need to learn a completely new language that has no significant benefit to what Groovy already offers. I suppose I still just don't get the fascination with shoehorning Ruby into Java when it appears to me that the Ruby-only folks are perfectly happy without Java.<br><br>The real problem is that I should have known better than to wade into this language back-and-forth stuff that just goes nowhere. So with my apologies, I would like to bow out of any further exchanges on this matter.Darryl Pentznoreply@blogger.comtag:blogger.com,1999:blog-4704664917418794835.post-36902993570758994912007-12-09T18:52:00.000-08:002007-12-09T18:52:00.000-08:00@darrylI think you are correct, a lot of Java peop...@darryl<br><br>I think you are correct, a lot of Java people will feel more comfortable with Groovy. But others are looking for something new, but still need to live inside of the Java world. It is all about taste, I personally feel more comfortable and enjoy writing Ruby better than Groovy. But I prefer writing either over Java. Someone else might prefer to write Python. It isn't about which is better, it is about which allows the developer to be most effective and express his idea clearest. I believe each developer will have a different preference on which language they wish to use and that is fine. The great thing about what is happening with the JVM is that soon it will be possible for each developer to chose the language that best suites him/her, but still take advantage of the power that the JVM brings.Daniel Roophttp://www.blogger.com/profile/01222783619317251889noreply@blogger.com