Re: Warning STklos feature: function redefination
In article <199507311331.JAA16463_at_lager.BBN.COM>, Ken Anderson <kanderso_at_bbn.com> writes:
Ken> I don't think this is a good idea. You are either
Ken> intentionally overwriting an existing function or you are not.
Ken> If it is unintentional something like a warning or an error is
Ken> informative. If it is intentional you have already saved the
Ken> orginal behavior if it is of use to you. If you want the
Ken> orginal behavior to be the default method of a generic function
Ken> of the same name, you should express that in your code rather
Ken> than relying on something that only happens automatically if a
Ken> generic already names an existing function. If this is a
Ken> common idiom, write a macro.
I think you assume that the programmer is responsible for all the code
in use. I was thinking of a situation where two independent libraries
need to be used at the same time, but they have both already been
written, and they each work as they are (the situation with the STklos
classes and the core Tk support). Your advice would be valid if we
all wrote generics for all our functions, or if we all used a package
mechanism (the same package mechanism?). Else, I think mine is the
lesser of evils...
Moises
Received on Mon Jul 31 1995 - 18:04:27 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST