[Top][All Lists]

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

Re: order of evaluation

From: Andy Wingo
Subject: Re: order of evaluation
Date: Mon, 17 Jun 2013 22:14:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi :)

On Mon 17 Jun 2013 15:49, Noah Lavine <address@hidden> writes:

> Unspecified-order looks exactly like `let', except that it can evaluate
> its clauses in any order before evaluating its body.

So it's exactly like `let', then? ;)

> I think we could make CSE work with this, don't you think?

Oh sure.  It works with let already.  It's just not as effective.

> To translate this into CPS, I think you need a form that introduces a
> continuation for every unspecified-order clause and then merges them,
> like this:
> (let ((foo-cont (lambda (A C) (foo A C))))
> (let-merge-points ((A A-cont) (C C-cont))
> (let ((make-A ((lambda () (a (b))))) ;; not CPS-translating this
> (make-C ((lambda () (c (d))))))
> (any-order (make-A A-cont) (make-C C-cont)))))
> Here let-merge-points introduces several continuations, and any-order
> calls them in any order. What do you think?

It's tough for me to read this example.  Does it have some strange

If I understand correctly, I think this is going in the wrong
abstractive direction -- CPS is nice because it's a limpid medium for
program transformations that also corresponds neatly to runtime.  With
this sort of thing we'd be moving farther away from the kind of code we
want to emit.  Dunno.


reply via email to

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