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

Re: Boxes: halfway through the comment period and no comments

This page is part of the web mail archives of SRFI 111 from before July 7th, 2015. The new archives for SRFI 111 contain all messages, not just those from before July 7th, 2015.



On 05/17/2013 11:09 AM, John Cowan wrote:
Can I assume that means everyone on this list is entirely happy with
them exactly as written?  Ghu knows, boxes are simple, which is why
I picked them as the first R7RS-large effort.  But a little feedback
wouldn't hurt either.

They're simple, but the interactions with other concepts aren't
completely obvious.

My first question is: what is the relationship between boxes and
promises?  Is a promise a kind of box?  I.e. a promise is a box
that can only be set once?  Are they both subtypes
of something else?  Would you use a box to implement a promise?
The "auto-boxing" section clearly has parallels with similar optional
features of promises, so there a clear connections.  It's surprising
they're not actually discussed.

See this discussion of "blank promises", which is even more of
a "set-once" box:
http://www.gnu.org/software/kawa/Lazy-evaluation.html#Blank-promises

Also, what about more general types of boxes.  For example
computed boxes, which are defined in terms of getter/setter functions.
Or being able to register a callback function ("listener"), which is
called when value the in box is changed.  In some models you can
register arbitrary numbers of listeners.
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/