[racket-dev] And/or as procedures when not in application position

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Dec 10 23:05:34 EST 2012

If you can make syntax identifier thingies like and behave as in a short-cutting way when they are used in a context such as andmap, I have no objections. 

By coincidence, I talked to Vincent an idea like that today but not and and andmap. 




On Dec 10, 2012, at 8:53 PM, Sam Tobin-Hochstadt wrote:

> On Mon, Dec 10, 2012 at 7:07 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>> 
>> Using and and or as higher-order functions, say for (fold (combine f and) #t l) has performance implications. It is quite different from (andmap f l).
> 
> In one sense, this is obviously true, since `andmap` is
> short-circuiting.  But with a sightly different implementation of
> `andmap`, I think (based on looking at the decompiled output) that
> these would generate basically identical code.  So the extra
> higher-orderness shouldn't be a performance problem here.
> 
> Sam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4373 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20121210/d76c927b/attachment.p7s>

Posted on the dev mailing list.