guile-user
[Top][All Lists]
Advanced

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

Re: About the primitive macros `and' and `or'


From: Keith Wright
Subject: Re: About the primitive macros `and' and `or'
Date: Sun, 27 Dec 2009 01:54:06 -0500

> From: Yi DAI <address@hidden>
> 
> I don't see the point why Scheme provides the general
> `and' and `or' as primitive macros (which does stand
> in our way when we wanna (apply and things) instead
> of primitive procedures. For efficiency?

This suggestion was thought of and rejected dozens
of times before you were born.  The present behaviour
is correct according to all previous versions of
the Scheme report and Lisp 1.5 if I recall correctly.

> If anyone can give a reasonable explanation, I may
> buy it. Otherwise, I will go with my version in the
> future. And I suggest Guile or the standard committee
> fix this annoying `bug' of Scheme.

A procedure evaluates all of its arguments in
unspecified order before binding their values
to parameters and evaluating its body.  QED

You can do what you want, in particular you
can easily write |and?| and |or?| procedures,
but if you persist in trying to put this change
into Guile, Scheme, or most any other dialect
of Lisp, we shall be forced to taunt you.

   -- Keith






reply via email to

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