From: T. V. Raman
Subject: Reference variables: Is the following safe?
Date: 
Message-ID: <1992Aug7.155932.5838@cs.cornell.edu>
Hi!

As a follow-up to my question a few days back on reference variables
in common lisp:

I have now decided to implement a simple structure 
(defstruct reference
val)

Now some variables in my program will be reference variables, others
will be ordinary variables. Rather than explicitly checking using
(reference-p foo) is the following safe?

(defmethod reference-value ((ordinary t))
ordinary)

(defmethod reference-value ((reference reference))
(reference-val reference))

Is the above safe or is it too much of a kluge?

--Raman
-- 
   T. V. Raman <·····@cs.cornell.edu>Tel: (607)255-7421 R 272-2435
		       Office: 5162 Upson Hall,
Department of Computer Science, Cornell University Ithaca NY 14853-6201
		Res: 226 Bryant Avenue Ithaca NY 14850
From: Barry Margolin
Subject: Re: Reference variables: Is the following safe?
Date: 
Message-ID: <15u9jrINNrvm@early-bird.think.com>
In article <····················@cs.cornell.edu> ·····@cs.cornell.edu (T. V. Raman) writes:
>(defmethod reference-value ((ordinary t))
>ordinary)
>
>(defmethod reference-value ((reference reference))
>(reference-val reference))

Looks fine to me, except for the lack of indentation.

-- 
Barry Margolin
System Manager, Thinking Machines Corp.

······@think.com          {uunet,harvard}!think!barmar