Re: Extensibility vs... ?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> > I'm creating a program and want to allow some easy extensibility in the
> > future... Please let me know your opinion on the matter:
> >
> > I like the idea of
> >
> >     result = MyFuncs( { "FunctionName" , { Parameters } } )
> >
> > and the brevity (read: "less typing" or "fewer keystrokes") of
> >
> >     result = FunctionName( Parameters )
> >
> > but the former is more extensible/flexible.
> >
> > Does anybody have a problem with the MyFuncs() method? A preference for
one
> > or the other?
>
> The first method does not preclude the second method. You define a new
routine (eg.
> FunctionName) and use it internally by the MyFuncs method and whoever
wants to
> can define a traditional-style interface to it, thus...
>
>    function FunctionName(object x)
>       return MyFuncs( {"FunctionName", {x}})
>    end function

True! This is basically a wrapper, and I could even provide a wrapper to the
base functions.

> I would go with the MyFuncs method because it is extensible.
>
> In win32lib, the event handlers get passed a 'params' parameter. By
> using this method, I've been able to add new data values in 'parms'
> without breaking existing code.

Yeah, I can appreciate that.

Thanks, Derek.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu