[Beanshell-dev] Interview about JSR on artima.com...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Beanshell-dev] Interview about JSR on artima.com...

patniemeyer

I answered some questions for this article about the JSR:

   http://www.artima.com/lejava/articles/beanshell.html

It's all pretty general stuff.  If I sound a bit funny it's because  
they edited the text pretty heavily ;)


Pat



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Beanshell-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-developers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [Beanshell-dev] Interview about JSR on artima.com...

patniemeyer
> What about anon. comments on the wiki:
>
> Won't the JSR 199 (http://jcp.org/en/jsr/detail?id=199) obviate
> BeanShell JSR or perhaps make some of it redundent?
>
> If there is a JSR 199, then much of a Java compatible syntax interpreter
> or script language would already be available. Of course, Beanshell and
> PNuts and other languages add scripting extras, but should these extras
> just be in a script syntax extension JSR? Not sure how exactly the JSRs
> interrelate, if they do at all.

Unfortunately JSR199 (and 269, the annotations API) do not go far enough
in terms of defining a standard AST model for the Java language to be
useful to us...  For some reason all of the JSRs have stayed away from
this job and I'm not sure that it's appropriate for JSR 274 (BeanShell)
either.

At some point one of the JSRs has to tackle this and when that is done we
can definitely use those interfaces for our internal ASTs...

Or, if more generally you mean - what good is BeanShell if you can just
call the compiler, well interpreting standard Java code is really only
half of what BeanShell does...  Scaling Java down to scripting
applications (interpreting loose types, fragments, etc.) is what makes it
useful in a broad range of applications.  You could certainly build a
scripting language that uses this API to compile things for you... but the
parsing and execution is not really the hard part...  figuring out what do
with with some crazy ambiguous name that the user just typed and things
like that are.

Take a look at the CVS history for the BeanShell classes... you'll find
that the ASTs that implement the core syntax hardly *ever* change...
essentially only when we introduce some totally new grammar element (like
the enhanced for-loop).  Some of them look essentially the same as the day
I wrote them...  But NameSpace.java, Name.java, things like that have
thousands of revisions.  That's where all the action is in a dynamic
language ;)



Pat Niemeyer




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Beanshell-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-developers
Loading...