On Sun, May 16, 2004 at 10:20:12PM -0400, Jeremy Maitin-Shepard wrote:
> I think the best solution, rather than using strings to name functions,
> is to simply use named functions, rather than anonymous functions.  (You
> could even require named functions, although that wouldn't really serve
> any purpose.)  Then a configuration tool would be able to understand
> bindings to named functions, which would be enough.  This is basically
> the Emacs approach, and works quite well.

Some pre-first-snapshot-release Ion3 had 'defcmd' and such, but I decided
it was too complicated having a command set partly separate from the 
scripting API. Also, the commands would still have to have been passed as
strings for the tool to be able to understand them without a parser of its
own, the only difference to the current way being that perhaps no
class qualification would have been required and the _ and _sub parameters
would not have been required. So

    kpress(MOD1.."1", "WScreen.switch_next(_, 1)")
        
would have become       

    kpress(MOD1.."1", "switch_next", 1)

a bit similarly to Ion1. But then there would have to be a separate
manual for these commands and... No, better keep it simple even if 
it means configuring is a little harder. At least an external tool 
can now understand the files, matching known patterns to some faster
understandable presentation.

-- 
Tuomo

Reply via email to