Re: Hacking BeanShell with JavaCC
"Daniel Leuck" <[email protected]> Wed, 16 Apr 2008 12:06:16 -1000
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Guys, BeanShell and Groovy are both great tools. I also really like C# 3.0 :-) Its best not to view languages as religions. I like a lot of Groovy's features (object builders, operator overloading, named arguments, etc.), but I agree with fschmidt that changing the semantics of Java's == operator was a bad design choice because it violates PLS (principal of least surprise) for Java programmers. As I mention in the blog post I implemented a <> equivalence operactor that works like Groovy's ==. I'll write about this in the next blog post. Note that the design goals of Groovy and Beanshell are quite different. The intent of the blog post was to demonstrate how easy it is to hack BeanShell with a little knowledge of JavaCC and JJTree. This is useful if you want to add a language feature or create a little DSL. I was not looking to start a language war :-) Dan On Wed, Apr 16, 2008 at 8:41 AM, Stevenson, Scott W <[email protected]> wrote: > CODE WAR? Ohh it's on baby! > > Some of us REALLY like the way Groovy does operator overloading. > Programming by convention is the next big thing. The Groovy way lets > you plug in pure java classes and still take advantage of operator > overloading. Groovy has all the best features of Java, BeanShell, Ruby, > and Python; while doing an excellent job of leveraging the full power of > Java. As for Python, I can't stand that the syntax is tab/whitespace > dependent. BeanShell is good if you just want a small embeddable > interpreter, but it stopped evolving somewhere around Java 1.3/1.4. > > In my opinion, Groovy is by far the best Java based scripting language > out there. It's only weakness, and its still significant, is in the > embedded shell. But those problems have been fixed for the interpreted > shell, and should soon be fixed for embedded users. > > Scott... > > > > -----Original Message----- > From: fschmidt [mailto:[email protected]] > Sent: Wednesday, April 16, 2008 1:08 PM > To: beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > Subject: Re: [Beanshell-dev] Hacking BeanShell with JavaCC > > > > > Not to start a language war, but Groovy is the epitome of bad design. I > just looked at their operator overloading page: > > http://groovy.codehaus.org/Operator+Overloading > > and I see that they actually change the meaning of standard Java > operators like this: > > a == b a.equals(b) or a.compareTo(b) == 0 > a != b ! a.equals(b) > > If you want interpreted Java, stick with BeanShell or Pnuts. If you > want a good interpreted language other than Java, use Python or Ruby. > There is no reason to ever use Groovy. > > And by the way, I hear that Python has a very nice MATLAB clone. > > > > Stevenson, Scott W wrote: > > > > If you've never scene Groovy, check it out at > http://groovy.codehaus.org/. > > It's a Java based scripting language that is a lot more "MATLAB like" > > then BeanShell. It supports operator overloading and lots of other > > features to make it a more suitable base for MATLAB. > > > > -- > View this message in context: > http://www.nabble.com/Hacking-BeanShell-with-JavaCC-tp16715411p16727268. > html > Sent from the BeanShell - Dev mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j > avaone > _______________________________________________ > Beanshell-developers mailing list > Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/beanshell-developers > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Beanshell-developers mailing list > Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/beanshell-developers > -- Daniel Leuck President Ikayzo, inc. +1 (808) 539-3804 (US Direct) +81 03-3655-2829 (Japan Direct) +1 (808) 393-9119 (Mobile) +1 (808) 591-1496 (Fax) http://www.ikayzo.com http://www.javaui.net ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone