I say we keep it simple ... On Wed, Aug 12, 2009 at 10:29 AM, Henrib<hbies...@gmail.com> wrote: > > I was implementing local variables & functions support when I realized it'd > be best to ask the community what they seek in JEXL before crossing this > boundary. > <snip/>
Glad you asked :-) > I've been using JEXL 1.1 as an "expression language" (like the JSP/JSF one), > a tiny syntax that would only evaluate simple expressions; the if, loop > constructs and blocks -{...}- are already "too much" in this view. In > JSPs/taglibs, all these are handled through "XML" syntaxes - if you allow me > this shortcut. > <snap/> Using that comparison, the place where JEXL excelled was to fill the gap that JSP EL had in terms of assignments, method invocations and a generally more seamless bridging to Java objects in the expression language context. Surrounding procedural Java code took the place of the JSP taglib (XML, as you say above) syntax as and when needed. > Going towards a "scripting language" seems to be our current direction (the > previously cited syntactic elements, JSR-233 support, main methods). At the > current rate if this is any indication, the 'jar' size will be 50% bigger > than 1.1 soon and JEXL will indeed become a scripting language close(r) to > JavaScript/ECMAScript & friends. > <snip/> Not really a direction per se: * We've had some syntactic additions, but its been organic growth * We do have a JSR-223 engine for convenience, I think we shouldn't go too far with it (no jexl.conf à la JEXL-63 please) * Same with Main classes, good for playing around but important to keep simple No coincidence that my latest comment on JEXL-70 contains "The purpose of Commons JEXL is to build JEXL, not complex command-line classes to use JEXL" (and by way of extension, other such peripheral bits). > So, just as a sanity check and to ensure the choice is explicit, should JEXL > "restrict" itself to a simple EL or "augment" itself towards a (simplified) > ECMAscript ? In the former case, it {c,sh}ould mean removing every syntax > that can use a block (loops, if, etc.); in the latter, we'll probably need > local variables, functions & return, loop enhancements (continue, break). > That's provocative but you get the idea. :-) > <snap/> I'm happy to keep things the way they are -- no more, no less for 2.0. -Rahul > Are there functional needs that you expect JEXL to cover ? Are there > constraints that would make any other scripting language - on the JVM - non > usable (complexity, size, ...)? > Thanks for sharing your thoughts, > Henrib --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org