A macro editor

Diez B. Roggisch deets at nospam.web.de
Thu Oct 20 15:09:58 EDT 2005


> My teammates and I were talking about to use one of Python, Ruby or 
> Groovy. But, we haven't decided which to use.
> 
> What seems to be easier is to use Python, you know.. because of the 
> Jython thing. But, it is probably a mistake to take Jython without a 
> extensive analysis of the all possibilities.

There seems to exist a Ruby java port, conveniently called jruby. 
Additionally, you might consider beanshell.

> 
>  From my point of view, the best choice will be those that allow the 
> average user getting results as fast as possible rather than the power 
> of the language itself. At the end, what we will write is a gateway to 
> access to our application's Java API through the scripts written by our 
> users.
> 
> In this sense, I'd like to ask if someone knows if any of these 
> languages have a Java implementation that supports code auto-complete 
> and class navigation or any kind of functionality that would ease and 
> speed up the user's learning curve and productivity.
> 
> In other words, is it possible to have a small and lightly intelligent 
> workbench window (a mini-Eclipse for example) for our future "macro 
> editor" within our application?

I doubt that will be possible. A language that has no type-declarations 
- that is true for ruby & python (regardless of their respective VM 
implementations) - can't possibly deliver that feature. And it looks as 
if the same is true for groovy.

The only thing I can imagine is that you try and recognize the 
"gateways" to your API-model and provide calltips for names that are 
bound to values from that model.

E.g. if you have a module called "core" that contains an 
application-object that represents your application, you could try and 
identify code like this:

app = core.applikation
app.<here comes a calltip>


However, if the user does fancy tricks like this:

setattr(self, "app", core.application)
self.app.<here you don't know s**t>

So - _I_ think the better user-experience comes froma well-working easy 
to use REPL to quickly give the scripts a try.

Regards,

Diez



More information about the Python-list mailing list