Another look at Groovy (Latest java based scripting language)再看一看在沟槽的(最新的基于Java的脚本语言)
I was recently pulled into我最近拉成 Groovy Groovy是 , a new Java based scripting language. You can read a ,一个新的基于Java的脚本语言。您可以阅读一 good article highlighting groovy in onjava.com好文章,突出Groovy是在onjava.com . 。
Groovy adds several syntactic sugar to Java. Groovy是增加了几个句法,糖渣华。 By itself it should be nice.本身应该很好。 However considering that most Groovy developers are originally Java developers, it might promote habit development which they cannot bring back to Java.不过考虑到多数Groovy是发展商原本是Java开发,它可能促进的习惯,发展他们无法带回的Java 。 Also some of scripting niceties are good for scripting languages, yet feel out of place for an oo development language.也有一些脚本细节是好的,为脚本语言,但感觉出来的地方,一面向对象的开发语言。 Just bad habit forming is what I think.只是坏习惯的形成是我的想法。
Personally I have seen that when I am forced to do some coding in javascript, I have to be extra careful when I am back in Java, to avoid pages of compilation errors.我个人已经看到,当我不得不做一些编码在JavaScript中,我必须格外小心,当我回到在Java中,以避免网页汇编的错误。 In that sense I am more comfortable using BeanShell as it much more closely mimics Java.在这个意义上,我更舒适的使用beanshell ,因为它更加密切模仿的Java 。
With autoboxing, enhanced for loops and other jdk1.5 syntactic sugars Java is much easier to code with.与autoboxing ,增强环路和其他jdk1.5句法糖Java是容易得多的代码。 My main gripe is public static void main我的主要抱怨是公共静态无效的主要 ![]()
Some of the scripting elements in groovy are counterintuitive, more so probably because I haven’t been initiated in Ruby cult(?).一些脚本元素的沟槽是相违背,更可能是因为我还没有开始在红宝石邪教( ? ) 。
Groovy is a decent language as scripting languages go, however the target audience is what makes me uncomfortable. Groovy是是一个体面的语言作为脚本语言去,但目标受众是什么令我不舒服。
Somehow I don’t feel the need to learn yet another scripting language.在某种程度上,我不觉得有需要了解的又一脚本语言。
Beanshell is slow as it is interpreted. beanshell是缓慢的,因为这是解释。 So what we need is a compiled beanshell to get best of both the worlds.因此,我们需要的是一种汇编beanshell ,以获得最好的两个世界。 I think I just might have a solution.我想我刚才可能有一个解决办法。 More on it later.更多的后来。
Looking forward for your comments.期待着您的意见。
PS.保安局常任秘书长。 Yes JPython is good, but then I am not much of Python & Perl fan either.是jpython是好的,但当时我没有太大的Python &的Perl范。 They are good for hacking, I would cringe to develop and maintain enterprise applications in them (not that it is impossible or it hasn’t been done).他们是好的,为黑客,我想cringe发展和维持企业应用在他们(不,这是不可能的,还是没有这样做) 。
Filed under提起下 Java Software Java软件 | |
| |
RSS 2.0 2.0 | |
Email this Article电子邮件此文章
You may also like to read您也可以想读 |




November 3rd, 2004 at 7:44 pm 2004年11月3日在下午7点44分
man, i’ll never understood why every body seems so scared to introduce new tools in their bags.男子,我永远不会理解为什么每一个机构,似乎这么害怕引进新的工具在他们的书包。 groovy is just another great language with the same potential as java (which, by the way, wasn’ta very developer-friendly one) and the software built with it will be as good as the developer team. Groovy是只不过是又一次伟大的语言具有相同潜力的Java (其中,方式,不是非常开发的友好一)和软件建设,这将不如开发团队。 so don’t worry at all… if you’ve done nice applications with java now you got a way to make the new ones even better.所以不要担心,在所有… …如果您已经做了很好的应用与Java现在,你明白的方式,使新的更加美好。 just drop your prejudices and embrace the new wave刚才您的下降,偏见和迎接新波
November 4th, 2004 at 12:28 am 2004年11月4日在上午12时28分
You know you want to try Ruby, it’ll make you feel good你知道你想要尝试红宝石,它会令你感觉良好
November 4th, 2004 at 2:39 am 2004年11月4日在上午02时39分
Based on your comments above, Janino seems like a reasonable match to your constraints.根据您的上述评论, janino好像一个合理的匹配到您的制约因素。
November 4th, 2004 at 4:43 am 2004年11月4日在上午04时43分
Groovy is pretty nice. Groovy是相当不错。 I was skeptical too at first, but then I caught Dion Almaer’s prez at the No Fluff Just Stuff tour in Boston a couple weeks ago.我是持怀疑态度太在第一,但后来我被席琳狄翁almaer的prez在没有绒毛刚才的东西游在波士顿一对夫妇星期前。 The amount of syntactic sugar is dizzying.金额句法糖是令人眼花缭乱。 It is significantly different from Java, enough to make it just another programming language.这是显着不同的Java ,足以令它只是另一种编程语言。 I mean, what you said about switching between languages for Java and Groovy you could just as well say about Java and Ruby or PERL.我的意思是,你所说的关于语言之间的转换为Java和Groovy是你可以一样说,关于Java和红宝石或Perl 。 They’re just different (although, sure, you could code Java in Groovy, but why?).只是他们很不同(虽然,肯定的是,你可以代码Java在沟槽的,但为什么呢? ) 。
The main things I like about Groovy are the support for XML, Ant, Web services, closures, the ability to code Strings without worrying about concatenation, the execute() method added to the String object, and the fact that you can compile Groovy scripts to Java class files, which implies, for example, you can now compile Ant builds into class files and deliver a jar instead of an XML file for a productized Ant script.主要的东西,我喜欢约沟槽的是支持XML ,蚂蚁, Web服务,关闭,能力代码字符串,无需担心串连,执行( )方法添加到String对象,事实上,您可以编译Groovy是脚本以Java类文件,这意味着,例如,你现在可以编译蚂蚁走进课堂,建立档案和提供一个罐子,而是一个XML文件为productized蚂蚁脚本。 Plus, Groovy is in progress to be supported by the JCP as the first language other than Java to be standardized on the Java platform.另外, Groovy是正在取得进展,以支持日本共产党作为第一语文以外的Java ,以规范对Java平台。 That will ensure strong support for Groovy users/programmers for the future.这将确保强有力的支持Groovy是使用者/程序员为未来作好准备。
November 4th, 2004 at 10:18 pm 2004年11月4日在下午10时18分
join the ruby cult we grant you happyness加入红宝石邪教,我们授予您happyness
Emh.. emh .. sorry..很抱歉.. I meant..我的意思.. Maybe what you want is a type inferencer for java.也许你想要的是一种inferencer for Java的。
In that case I suggest you take a look at Nice.在这种情况下,我建议你考虑一下好。 It is basically a better java featuring real closures, multimethod dispatch and type inference.它基本上是一个更好的Java具有真正的关闭,多元调度和类型的推论。
Nice seems quite strange at a first look, but indeed it is very powerful and pleasant language, and compiles to bytecode withouth great performance losses (au contraire that groovy)尼斯似乎很奇怪,在一个先看看,但事实上,这是非常强大的和愉快的语言,和汇编,以字节withouth的伟大业绩亏损(非盟contraire认为,沟槽)
November 23rd, 2004 at 11:17 pm 2004年11月23日在下午11时17分
Thanks everyone for your helpful comments and suggestions.谢谢大家为您有用的意见和建议。
It is your participation that makes the effort worthwhile.这是你们的参与,使努力是值得的。
January 16th, 2005 at 8:55 am 2005年1月16日在上午8时55分
I don’t think we needed another scripting language…我不认为我们需要另一种脚本语言…
Javascript perfectly combines with java (if only people were able to understand that javascript is not only for building a web page) and mozilla Rhino has proved it. JavaScript的完美结合与Java (如果只有人能够明白, JavaScript的,不只是为了建立一个网页)和Mozilla犀牛已证明了这一点。
And now finally we are beginning to see technology built upon it.现在我们终于开始看到技术建立在它。 How about seppia ?如何塞皮亚? http://www.seppia.org
Seppia is combines ecmascript (javascript) into java and allows you to build any application from its constituent parts.塞皮亚是结合ecmascript (是JavaScript )到Java和让您建立的任何申请,从它的组成部分。
March 23rd, 2006 at 9:08 am 2006年3月23日在上午09时08分
I have the same issue and I quote :我有同样的问题我引述如下:
“Beanshell is slow as it is interpreted. “ beanshell是缓慢的,因为这是解释。 So what we need is a compiled beanshell to get best of both the worlds.因此,我们需要的是一种汇编beanshell ,以获得最好的两个世界。 I think I just might have a solution.我想我刚才可能有一个解决办法。 More on it later.”更多的后来“ 。
Enlighten us please,what is this solution?启示我们请,这是什么解决办法?
did you find anything that works like beanshell but is faster ?你找到任何工作一样, beanshell ,但是更快吗?
thanks谢谢