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

(define foo)



> As I remember, at one point we had achieved consensus on allowing
> definitions of the form
> 	(define foo)
> to mean that foo is to become bound, but not assigned any particular
> value; references to foo are errors until foo is assigned.
> 
> Are there any objections to this?  If not, I would encourage the
> editor to put it in the next report.

This is fine with me.  However, I think that references to foo prior to
the first assignment should not be an error.  I prefer to think of this
form as binding foo to an undefined value.  Thus:

  (define foo)     is equivalent to (define foo (if #f 'dummy))
  (eq? foo foo)    should not be an error and should return #t

Question to all... should the same hold for bindings (in let, let*, ...)?
For example:

  (let ((x) (y 5)) ...)

For consistency it should be possible but I don't like it much...

Marc