Generics Java Language Feature in BeanShell (revisited)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Generics Java Language Feature in BeanShell (revisited)

Galder Zamarreno-2

I just wanted to briefly comment on this post:

> Re: [Beanshell-users] Generics Java Language Feature
> in BeanShell
> From: Daniel Martin <martin@sn...> - 2007-05-09
> Cheok Yan Cheng <yccheok@ya...> writes:

>> I had did some testing on BeanShell. It seems that
>> it doesn't support Java Generics Language feature
>> current moment. Am I right? Is there any plan to
>> support this feature in future release?

> What would it mean if beanshell did support

> Note that since variables in Beanshell are not
> statically typed, and since BeanShell is not
> compiled, the benefit of Java > Generics is
> limited at best. The main benefit of Java Generics
> to make compile-time type guarantees about
> parameterized types, which also allows you to avoid
> lots of casting when you know what type the
> object will be.

> In beanshell, you never needed to do that casting in
> the first place.

> I can't see what generic support would mean to
> beanshell - if you have some code that uses Java
> Generics, the way to convert > it to beanshell
> so far as I can see is to strip everything inside
> angle brackets.

> The only way to support generics that I can imagine
> making sense in beanshell is to modify the parser so

> that it rips out the generic type parameter bits.

I can see your point and I agree with you. However, we
use BeanShell for demo/tutorial purpouses, in which
case, we wanna promote best practices within this
demo/tutorial. Therefore, as generics are still not
supported, we have to use standard collections, which
is fine, but not perfect :)

Thanks to all for your effort in this project :D

Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today* 

This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Beanshell-users mailing list
[hidden email]