guile-user
[Top][All Lists]
Advanced

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

Re: (load) Question


From: Robert Uhl <address@hidden>
Subject: Re: (load) Question
Date: 16 Feb 2003 17:47:47 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

Keith Wright <address@hidden> writes:
>
> > > load returns an unspecified value according to R5RS.  Does (eval
> > > (read)) suit your needs?
> > 
> > Yup, that's it.  Bit of a nuisance--now that I know what to look
> > for, I was able to spot it in the docs.  Thanks much.
> 
> Why nuisance?  Load reads a whole file which may contain zero or more
> definitions and zero or more expression.  Choosing one that gets
> returned would be kind of arbitrary, and then what do you do if there
> are no expression?

I'd follow the example of let, begin & friends: the last expression's
result is returned.  If there are no expressions, it's undefined.  Seems
fairly straightforward to me--at least, I cannot think of any reason
_not_ to have it behave thus.

Perhaps there's a good reason; I don't know.  But it seems to me that
returning the result of the last expression would make sense.

-- 
Robert Uhl <address@hidden>
Every man, woman, and responsible child has a natural, fundamental,
and inalienable human, individual, civil, and Constitutional right
(within the limits of the Non-Aggression Principle) to obtain, own,
and carry, openly or concealed, any weapon--handgun, shotgun, rifle,
machinegun, anything--any time, anywhere, without asking anyone's
permission.                                       --L. Neil Smith




reply via email to

[Prev in Thread] Current Thread [Next in Thread]