[gambit-list] Promises & lazy thunks
Bradley Lucier
lucier at math.purdue.edu
Mon Apr 29 17:12:39 EDT 2013
On Apr 29, 2013, at 4:31 PM, Jason Felice wrote:
>
> On Mon, Apr 29, 2013 at 4:13 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
>
> Primitives like "cons" and "list" should not force their arguments because they are not strict (i.e. they don't need to know the value of the arguments).
>
> It isn't clear if type predicates are strict or not. I can see arguments both ways.
>
> Hmm, I can't think of a reason to make them lazy. What's the thought?
Well, if you'd like to see whether something is a promise or a fixnum, you'd have to call (promise? x) first if (fixnum? x) always forces its argument.
I've been thinking about this a bit, I'm not going to use the auto-force Gambit, but perhaps the type predicates should be made consistent.
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130429/f08d8af7/attachment.htm>
More information about the Gambit-list
mailing list