This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: another nit.
Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
> dirk@ida.ing.tu-bs.de writes:
> > 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>.
>
> I take it this #<unspecified> or rather SCM_UNDEFINED is here to stay,
> is it not? In that case, there is no problem, because I can just keep
> using my own routines instead of assq-ref. (I actually use them from
> within C only, so I can live with implementation specificness).
You should use assq. If it returns false then the key doesn't exist.
Otherwise the value is cdr of what assq returns.
--
Harvey Stein
Bloomberg LP
hjstein@bfr.co.il