unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Daniel Hartwig <mandyke@gmail.com>
Cc: guile-devel@gnu.org
Subject: Re: Record type printers for SRFI 45 promises and SRFI 41 streams
Date: Mon, 08 Apr 2013 15:31:41 -0400	[thread overview]
Message-ID: <87fvz0stsy.fsf@tines.lan> (raw)
In-Reply-To: <CAN3veRejd6CuGJh32WpMd5gy6fja7-8T2J9+3aNaTA-HtQUFRg@mail.gmail.com> (Daniel Hartwig's message of "Mon, 8 Apr 2013 07:13:09 +0800")

Hi Daniel,

Daniel Hartwig <mandyke@gmail.com> writes:
> I dont see much value in distinguishing between eager and lazy,
> particularly as this leads to an unusual display format.  What
> difference does it make how the object was constructed?

It doesn't, and I agree that it's confusing.  In the SRFI-45
implementation, 'eager' means "computed", and 'lazy' means "not yet
computed".  These internal meanings are distinct from the 'lazy' and
'eager' exported to users.

> Also, this is not avoiding "#<procedure" as suggested?  A simple
> "#<promise OBJECT-ADDRESS>" is succinct and sufficient.

Sorry for flip-flopping on this, but I realized that there's an
advantage to printing the full procedure, namely that it includes the
source location of the associated (delay ...) expression.

> To distinguish from core promises a more explicit tag is preferable,
> like srfi-69 uses:
> 
> #<srfi-45:promise OBJ-ADDR>

We later discussed this on IRC, but for those who weren't present:

The problem with this idea is that there's likely to be another new SRFI
that's almost identical to SRFI-45 but with 'eager' as a macro instead
of a procedure, so that it can accept a single expression that yields
multiple values.

We'll want to use the same underlying type to support both SRFIs, at
which point this idea of printing the SRFI number in the tag breaks
down.

      Regards,
        Mark



      parent reply	other threads:[~2013-04-08 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07 16:49 Record type printers for SRFI 45 promises and SRFI 41 streams Chris K. Jester-Young
2013-04-07 17:01 ` Mark H Weaver
2013-04-07 23:13 ` Daniel Hartwig
2013-04-07 23:19   ` Daniel Hartwig
2013-04-08 19:31   ` Mark H Weaver [this message]

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=87fvz0stsy.fsf@tines.lan \
    --to=mhw@netris.org \
    --cc=guile-devel@gnu.org \
    --cc=mandyke@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).