On 13 Oct 2000, Lars Gullik Bjønnes wrote:

> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> 
> | >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | 
> | Lars> You mean so that we can have a centralized testing at the top of
> | Lars> the function?
> | 
> | I'm not sure what I mean exactly, but we could declare the arguments
> | of the function so that there type can be checked by dispatch, and the
> | the func would use string_arg[1], int_arg[2] and the code would check
> | the function uses the arguments in the way it declared it should.
> | 
> | Maybe it is not useful, after all. Or too complicated for what it
> | provides. Anyway, I think we should not need tests at the beginning of
> | each function.
> 
> One other idea togeter with this is to have all the lyxfuncs
> dynamically loadable...
> 
> then we can use the name of the lyxfunc as name of the dynamic
> loadable object and pass just the required number of args each time...
> 
> type t = ldopen(lyxaction.name(LFUN_BUFFER_NEW));
> t(arg1, arg2, arg3);
> 
> or similar (we can have the dynamic loadable objects linked into lyx)

I think what JMarc was starting to ask for is compile-time type checking.
We'd get that with the ldopen plan I think.  Something which has been
suggested before in a different form is a map<> of functions keyed by
LFUN.

Allan. (ARRae)

Reply via email to