Reputation: 41
I'm trying to choose between groovy and beanshell, I need one that is in active development, is moderately fast, can access/interpret java code and support restriction to which java classes it can access in my internal code. I'm not sure if beanshell is still in active development. Please advice me.
Thank you.
Upvotes: 3
Views: 1033
Reputation: 71
Below are the differences i found between groovy and beanshell
I would prefer groovy for my development as its serves my purpose wherein it can execute a script written in beanshell.
Anyways below are the observations i found when i evaluated Groovy 2.0.0 agains Beanshell 2.0b4
Both these scripting languages has syntax similar to Java.
Groovy
Supports Generics and collections with generics. Also suports raw types eg> ArrayList str = new ArrayList()
Supports calling methods with variable arguments eg. method(int...i)
BeanShell
Doesnt support assinging certain hex decimal values to the primitive data types eg int i = 0x80018000 throws an exception from the beanshell interpreter saying the size is big A BigInteger is to be used in this case which is again tedious as we have to do something like this BigInteger i = new BigInteger("0x80018000");
This problem occurs even if we declare long i = 0x80018000
Upvotes: 2
Reputation: 29689
It appears that Beanshell is under development lately and will be integrated into J2SE at some point. I would vote for Beanshell over Groovy, the most important reason being that it is a bit more straight forward instead of having the learning curve of trying to learn all of Groovy's unique syntax, making it almost like learning a new language.
Upvotes: 0
Reputation: 1503439
Looking over the beanshell.org archives, it looks like it hasn't been under really active development since 2005. The developer mailing list hasn't had any traffic since January 2009. It's possible that the work has moved elsewhere, of course, but I can't see any obvious destinations...
Groovy is definitely under active development.
(Disclaimer: as someone involved in the Groovy in Action book, I have a certain amount of bias... but I don't actually use Groovy on a regular basis; it's not like I have an axe to grind :)
Upvotes: 7