Just out of curiosity, why does VASSAL have a bsh library in it? And is that some bsh source code I see in VASSAL? (Like what the heck is up with including a generated Parser.java file?) Couldn’t we just get the bsh functionality we need from a jar?
Just out of curiosity, why does VASSAL have a bsh library in it? And is
that some bsh source code I see in VASSAL? (Like what the heck is up
with including a generated Parser.java file?) Couldn’t we just get the
bsh functionality we need from a jar?
There is a JAR for BeanShell. I don’t know the reason we’re not using it.
Brent can comment on this, as BeanShell support is one of his projects.
Would something lighter, like jep, or rhino suffice?
I was not previously aware of Rhino, and a quick look indicates it may be a better choice than Beanshell. Rhino is included in JRE6, whereas Beanshell development has stalled. The dynamic variable typing of Javascript is also a better match to the way Vassal works than straight Java, and simpler to pick up.
The choice to make seems to be between Java and Javascript. Which is the more established language? Which is easier to work with? Which is more widely known? Object-oriented ease? Type ease?
In any case, I believe we can write functions or libraries to let module designers work easier and more efficiently. There really isn’t any real disadvantage to either language. Both have same scope mechanisms (I think, not so familiar with Javascript).
Actually, Beanshell2 is still pretty active here[1].
The choice to make seems to be between Java and Javascript. Which is the
more established language? Which is easier to work with? Which is more
widely known? Object-oriented ease? Type ease?
In any case, I believe we can write functions or libraries to let module
designers work easier and more efficiently. There really isn’t any real
disadvantage to either language. Both have same scope mechanisms (I
think, not so familiar with Javascript).
JavaScript is a nasty, nasty langauge. It has global scoping, which is
frustrating, and an object model which is very little like what we have
on the Java side. JavaScript is not something I would want to put myself
in a position to have to explain to users. Among our users who are
programmers, I would bet that far more of them will have used Java than
JavaScript.