[Top][All Lists]

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

Re: GNU Guile 2.9.5 Released [beta]

From: Andy Wingo
Subject: Re: GNU Guile 2.9.5 Released [beta]
Date: Tue, 07 Jan 2020 22:53:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

On Tue 07 Jan 2020 00:14, Chris Vine <address@hidden> writes:

> I wonder if it would surprise the programmer to have the cond
> conditionals evaluated in a different dynamic environment from the one
> in which the cond consequential is evaluated where there is a
> conditional which is true.

I entirely agree it's not ideal and can be surprising!  I am not sure
that there is an "ideal" here though; with-exception-handler is
wonderfully expressive but can be verbose, guard is a pleasant
abbreviation but how to deal with re-raising from the original context?

In the end, "guard" is just a macro over a more general facility.  But
it's a macro that we expect people to use, and to cover the common case.
To that end I think we should make it cheap and avoid rewinding while
also preserving the nice characteristic of evaluating cond consequents
in the continuation of the "guard" itself.


reply via email to

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