The Artima Developer Community
This article is sponsored by the Java Community Process.

Leading-Edge Java
Scripting Java: The BeanShell JSR
A conversation with Patrick Niemeyer
by Frank Sommers
June 3, 2005

<<  Page 3 of 3


Language design in the JCP

Frank Sommers: BeanShell has been around for several years now, and seems a fairly mature tool. How does the JCP benefit the BeanShell project at this stage? How will standardization of BeanShell benefit existing BeanShell users? How will it help the broader Java developer community?

Pat Niemeyer: BeanShell will benefit the Java platform by enabling all the capabilities I was talking about earlier, right in the core. There is a difference between being able to rely on a feature in the core APIs and having to supply it, small though that feature physically may be. That Java will have a standard scripting language, and that developers will implicitly know and understand that language because it uses Java syntax, will be a boon for all of the reasons I cited before.

As well, there is the impact of standardization on the BeanShell project and community. I think the JSR work, and the scrutiny that comes with it, is going to be a very good thing for BeanShell. The process of writing a language spec, and the input of the very smart people on the expert group and beyond, will take this little language that has grown up in fits and spurts over the years and really shake it down and work out the kinks. The existing community will continue as it always has, driving the language forward, and now supplying the reference implementation and compatibility test kit for the JSR.

Frank Sommers: Design-by-committee has often handicapped programming languages in the past. Larry Wall, Guido van Rossum, James Gosling, and other successful language designers advocate the "benevolent dictator" approach, where users may suggest features, but ultimately the project's "benevolent dictator" decides what to include and what to reject. How does running a scripting language project through the JCP change those dynamics? Wouldn't expert group members feel dejected if you refused to include features they suggested just because you didn't think those features fit your vision of BeanShell?

Pat Niemeyer: Over the years I have served as a hopefully "benevolent dictator," as well as a bottleneck, on progress in the BeanShell language. Many people have contributed to the project, but I have maintained strong views on keeping the language simple, minimal, and free of clutter.

This was a trade-off, but I think that has paid off in that there are very few things in the language that I would now like to remove. We are in a perfect position to be Java 5-compatible, and can take advantage of those new language features without having stepped all over them by prematurely implementing our own syntax. Some of that was by design, some of that was because I did not have enough time—that's why I was a "bottleneck"—to think about all the ramifications of a change, and therefore wasn't comfortable deciding many issues.

I believe that I will be able to maintain this focus with the expert group, and I hope that it will not be as painful as you suggest. I am looking forward to the influx of opinion, and I only hope that I can keep up with the project so that I don't slow it down too much. If everyone in the community or expert group seems to disagree with me, I'll probably go with the consensus. But then again, I might not (smile).

As for features, I do have some exciting ideas on how we can incorporate new specialized syntax into the language in the future in a pluggable way, without adding baggage to the core. I hope to present some of those at the JavaOne BeanShell BOF this year.

Talk back!

Have an opinion about scripting languages in Java and the BeanShell? Discuss this article in the Articles Forum topic, Scripting Java: The BeanShell JSR.


[1] JSR 274. The BeanShell Scripting Language

[2] Patrick Niemeyer, Jonathan Knudsen. Learning Java Second Edition. O'Reilly and Associates, 2002.

[3] JSR 223: Scripting for the Java Platform

[4] Apache Bean Scripting Framework

[5] JSR 241: The Groovy Programming Language

See also:

BeanShell Wiki

Dwight Shih, Hibernate Prototyping with the BeanShell

About the author

Frank Sommers is a Senior Editor with Artima Developer. He also serves as chief editor of, the IEEE Technical Committee on Scalable Computing's newsletter, and is an elected member of the Jini Community's Technical Oversight Committee. Frank is also founder and president of Autospaces, a company dedicated to delivering rich-client Java enterprise solutions to small and medium-size businesses. Prior to joining Artima, Frank wrote the Jiniology and Web services columns for JavaWorld.

<<  Page 3 of 3

This article is sponsored by the Java Community Process.

Sponsored Links

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use