From: William D. Gooch
Subject: Re: Processing of inputs
Date: 
Message-ID: <Pine.A32.3.90.941005121126.41213Q-100000@swim5.eng.sematech.org>
On 5 Oct 1994, Iain J. Bryson wrote:

> Hi, I am new to LISP and CLOS and I have stumbled
> across a problem.  Is there any way to write your
> own writer function which could process the new
> value of a slot or field before it sets that
> field or slot's value?  I mean, for instance, I
> want to make a time class and I don't want to
> be able to set hours to 6765 etc..

If you are using slot accessors exclusively (not relying on the lexical 
binding of instance variables to set their values), you can define an 
:around method for the accessor which checks its arg(s) before allowing 
the primary method to execute.