This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: another nit.


On 6 Jul 2000, Michael Livshin wrote:

> (if #f #f) will yield you the `unspecified' object in any Scheme.

As will (set! foo bar)?  No:  There is no such thing as an unspecified
object in R5RS.  R5RS says about 'unspecified':

  If the value of an expression is said to be "unspecified," then the
  expression must evaluate to some object without signalling an error, but
  the value depends on the implementation; this report explicitly does not
  say what value should be returned.

Guile _chooses_ to return a guile-specific object, namely
#<unspecified>.  But this choice is arbitrary, motivated by the intention
that guile users don't rely on any unspecified behaviour.  In fact, if you
detect an #<unspecified> object in your computations, this is meant to
indicate that somewhere you are relying on unspecified _behaviour_, not on
unspecified _data_.  Thus, using guile's #<unspecified> value for any
other purpose is definitely a misuse.

Best regards
Dirk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]