In my April
23 post, I said that I intended to write
a Moneydance extension which
would make Moneydance scriptable from [one of the Java implementations
of] Scheme.
I'd still like to do that, but have tentatively decided that that will
not be the first Moneydance extension that I will loose upon the
world. The first one will still be a scripting interface, but
for a different scripting
language: BeanShell.
So what's Beanshell? The really short answer is that
BeanShell is interpreted, simplified Java. "Simplified" in
several senses; one is that declaring the types of your variables is
optional in BeanShell. Also, BeanShell can be run in a "console"
mode in which you type a single BeanShell statement, and it is
executed immediately.
A BeanShell call to a Java method looks exactly like a Java call to
the same method. Behind the scenes, the BeanShell interpreter
uses the Java "reflection" API to invoke the method.
This means that, while you can use BeanShell to write and run what we
ordinarily think of as "scripts", you can also use it as a learning
tool. If the Javadoc for an API doesn't make it crystal clear
just how to write that method call that you need, a little
experimentation can usually clear it up. You can do that
experimentation in Java, of course, but doing it in BeanShell tends to
be considerably faster.
Now actually, the same ability to experiment quickly with a Java API
is also present in at least one of the Scheme implementations:
namely, JScheme.
The difference is that, in order to use JScheme in that manner, you
have to know how to program in Scheme, and also know a good
bit about Java: at least enough to read Javadoc. It's a pretty
good bet that more people, today, know Java than know Scheme, but it's
a dead solid cinch that more people know Java than know both.
(Perhaps you've never heard of BeanShell before, but if you know Java,
then I've already told you nearly everything you need to know in order
to get started in using BeanShell to explore an API.)
So there's the major reason for the change in plans: the BeanShell
scripting interface has a bigger potential user base than a Scheme
scripting interface does. In particular, the BeanShell scripting
interface should be useful to anyone engaged in learning the
Moneydance API, in order to write their own Moneydance
extension(s). It might even encourage more people to do so.
The plan is, as I said, "tentative". Why? Mostly because
I'd probably abandon it, if I found out that someone else was already
working on the same thing, and had a big head start. That
consideration is part of the reason for this vaporware announcement;
I'm hoping to get the word out such that, if my undertaking it would
indeed be a duplication of effort, I'll find out.
I suppose I'd also reconsider the change of plan if this posting led
to a great clamor of demand for me to implement a Scheme-Moneydance
scripting interface as soon as possible. Or, for that matter, if
it resulted in squadrons of pigs flying around my house at all hours.
Categorie(s) for this post include:
Personal Finance Software;
Java.
4:20:13 PM
|