On Thu, Sep 05, 2002 at 03:38:03PM +0000, Damian Conway wrote:
> Jonathan Scott Duff wrote:
> > This continues to make no sense to me. The "hypotheticality" of a
> > variable seems quite orthogonal to what you do with it (bind, assign,
> > whatever).  Why should these two things be intimate?
> 
> Because what you do with a hypothetical has to be reversible.

I thought it was just the hypothetical's existence that has to be
reversible.

> And binding is far more cheaply reversible than assignment.
> It's also far cheaper in the forward direction. And that's
> important in pattern matching, especially as we may be to-and-fro-ing
> over the hypothetical many times.

Sounds like an optimization that should be in the hands of the
programmer to me.

Given that we've already given the programmer the ability to put
arbitrarily complex code in the pattern, I think the expense of
assignment versus binding may wash out in the forward direction.  And
the expense in the reverse direction may be equal if it just has to
destroy the variable.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to