On Mon, Jan 15, 2001 at 06:06:31PM +0100, Lars Gullik Bjønnes wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> | 
> | A lyxfunc could take a stream argument from which it reads the actual
> | arguments. Most commands are passed around as strings anyway so it makes no
> | difference where it is converted to int/double/whatwever.
> 
> I'd rather have the real lyxfunc the the correct paramters from the
> beginning, and have a wrapper that create those argumetns from the
> supplied stream.

Having a lyxfunc take a stream argument has a major disadvantage:  it
transforms a compile-time error into a runtime one.  Having a template
class for lyxfunc's, as Lars initially proposed, won't compile if
someone feeds it the wrong arguments.  I'm talking developers here,
not users.  Catching programming errors during the build is much
easier to debug than runtime errors.

This leaves only parsing the minibuffer/keybinding defns. for runtime
errors.  That parsing, however, can perform typechecking before
calling the actual lyxfunc.

-- 
John Weiss

"Not through coersion.  Not by force.  But by compassion.  By
affection.  And, a small fish."  -His Holiness, the 14th Dalai Lama 

Reply via email to