From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] Implement SRFI-111 Boxes
Date: Fri, 24 Jan 2014 10:39:45 +0100 [thread overview]
Message-ID: <87txctzpjy.fsf@taylan.uni.cx> (raw)
In-Reply-To: <87a9elkjmo.fsf@netris.org> (Mark H. Weaver's message of "Fri, 24 Jan 2014 00:56:47 -0500")
Mark H Weaver <mhw@netris.org> writes:
> Here's an implementation of SRFI-111 Boxes for stable-2.0.
> What do you think?
>
> Mark
Has it been considered to coalesce the box type with Guile's "variable"
type? I can see two concrete differences:
* External representation (*not* specified by SRFI-111)
* Variables can be "unbound" (empty), boxes can't
So we could get away with making the box API consist of aliases to a
subset of the variable API and still conform to SRFI-111.
This would eliminate type-disjointness between variables and boxes, make
boxes print with #<variable, make objects exist that are box? but error
when passed to unbox, and eliminate the extra record type. And as a
more "volatile" point, it would make boxes perform possibly a bit faster
now (direct C implementation, whereas records all have some overhead as
of now AFAIK), but a bit slower in theory given a perfect record-type
implementation (needn't check for boundness during `unbox').
I suppose that's more cons than pros after all? And very sorry if I'm
bikeshedding, I thought this was worth at least a mention and a quick
survey.
Taylan
next prev parent reply other threads:[~2014-01-24 9:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 5:56 [PATCH] Implement SRFI-111 Boxes Mark H Weaver
2014-01-24 9:39 ` Taylan Ulrich Bayırlı/Kammer [this message]
2014-01-24 10:57 ` Ludovic Courtès
2014-03-24 22:23 ` Andy Wingo
2014-03-25 17:01 ` Ludovic Courtès
2014-03-25 19:37 ` Andy Wingo
2014-03-25 20:21 ` Ludovic Courtès
2014-03-25 20:31 ` Andy Wingo
2014-03-25 21:18 ` Ludovic Courtès
2014-01-24 10:55 ` Ludovic Courtès
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=87txctzpjy.fsf@taylan.uni.cx \
--to=taylanbayirli@gmail.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
/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).