Comment with parsimony (was something else)

Monte Goulding monte at sweattechnologies.com
Tue May 13 03:19:01 EDT 2003


>
> Hi Monte,
>
> > Firstly I should state that if you need to know where you call
> a function
> > from it's poor design.
>
> Beg to disagree. Take the libURL libray for instance. It has functions and
> handlers which get called from users all over the place. I have a handler
> called altPost which interfaces proxy servers to libURL. If I want to make
> changes in altPost, I'd like to know each instance it's being called from.
>
My point was that you should avoid linking the function to the calling
handler in any way other that the defined interface. For example if you have
an function:
getMyInfo(myName) which returns info then you can change the impementation
to your hearts content as long as you continue to only require myName as a
parameter and only return info.

So I wasn't saying that you shouldn't call functions from all over the place
just that you should abstract away functions as much as possible. Obviously
sometimes you need to do stuff like add an extra parameter or return a
different data format which is when your search would come in handy.

Cheer

Monte




More information about the metacard mailing list