[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

change to instance structure protocol

   There are two problems with letting users define methods like it:

     1) They could bash a system method.

     2) Two users could remove each other's methods; in this sense,
     defining a method like the one you propose is like programming
     with advice rather than metaobject programming.

There are problems with your problems, which will lead to my main point.

1. Even with all the caveats you can think of, a user's program could
still bash a system method.

2. Two users can always remove each other's methods regardless of the
limitations you put on what methods can be defined (unless you rule
them all out).

3. An important class of metaobject programming is instrumentation and
history keeping. This is naturally captured by auxiliary methods. Are
you trying to say that method combination is a bad idea because a lot
of it is like advice programming?

The real problem is that you are trying to specify what can only be
specified with difficulty or possibly not at all. You really want to
say that MOP acts as specified by the statement S, and you are not
allowed to do anything that changes S much. Your approach is to
provide some heuristic rules that approximate the two parts of this:
namely, the part that specifies what S is and the part that defines