RE: Closures

"Shankar Unni" <[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
> The problem with any particular bit of sugar is that it 
> hampers this movement.  

Right. While I'm against any wholesale revision of syntax like Groovy's
(e.g. the "optional" semicolons, the unpredictable (by humans) end-of-line
semantics :-/), you could consider BeanShell to be a testbed for trying out
of new features for Java.

No feature should be added into a language without some real-life trial and
error, with the syntax, the semantics, the benefits and pitfalls fully
understood; a scripting language like BeanShell can be a fine testbed
because of its user base.

(And BeanShell *does* have some features that make back-porting of code to
Java "difficult" - e.g. untyped variables. But I don't think anyone will
argue that untyped variables be dropped from BeanShell, for obvious reasons
beyond "compatibility"..)

It's too bad JSR65 (concise array literals) was abandoned - it's a simple
extension that has an unambiguous and easily understood meaning (esp. in
conjunction with auto-boxing), and improves code readability tremendously.
But BeanShell can be a testbed for such a feature if it is to be
re-introduced in the future.




-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.