unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Noah Lavine <noah.b.lavine@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: order of evaluation
Date: Mon, 17 Jun 2013 22:14:22 +0200	[thread overview]
Message-ID: <87mwqo4hr5.fsf@pobox.com> (raw)
In-Reply-To: <CA+U71=Nxv7wN7j-HhqZkHrJbgRzqA1_JrEcugUdVpWcgfE3NHw@mail.gmail.com> (Noah Lavine's message of "Mon, 17 Jun 2013 09:49:14 -0400")

Hi :)

On Mon 17 Jun 2013 15:49, Noah Lavine <noah.b.lavine@gmail.com> 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
formatting?

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.

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2013-06-17 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 10:10 order of evaluation Andy Wingo
2013-06-17 13:49 ` Noah Lavine
2013-06-17 20:14   ` Andy Wingo [this message]
2013-06-18  0:39     ` Noah Lavine
2013-06-18  1:06     ` William ML Leslie
2013-06-23 13:46 ` Ludovic Courtès
2013-07-03 18:57 ` order of evaluation, letrec-values, and define-values Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mwqo4hr5.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=noah.b.lavine@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).