Subject: Re: Trouble with labels
From: Erik Naggum <erik@naggum.net>
Date: 12 Apr 2001 13:36:45 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3196071405677961@naggum.net>

* Barry Margolin <barmar@genuity.net>
> Actually, the above example is pretty silly.  :before and :after methods
> are mostly useful in subclasses or mixin classes, to add behavior without
> totally overriding the primary method that you inherit.  Putting the
> :before method in the same class as the primary method doesn't really
> make a whole lot of sense -- the error check could just as easily be put
> in the primary method.

  Sigh.  In real life, how you deal with withdrawal requests in the absence
  of sufficient funds depends on the account.  Add a credit limit, and you
  need more work, for instance.  The reaction to such a request is _not_
  integral to the withdrawal process, and conflating the two processes of
  updating the balance and dealing with insufficient funds is really silly,
  because you need to reimplement the core operation (updating the balance)
  in a subclass with different characteristics.  That's bad design.

#:Erik
-- 
  I found no peace in solitude.
  I found no chaos in catastrophe.
			-- :wumpscut: