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

2012-12-10 Thread Sam Tobin-Hochstadt
On Mon, Dec 10, 2012 at 11:05 PM, Matthias Felleisen wrote: > > 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. You would need a different list operation -- you can't express `andmap`

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

2012-12-10 Thread Matthias Felleisen
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

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

2012-12-10 Thread Sam Tobin-Hochstadt
On Mon, Dec 10, 2012 at 7:07 PM, Matthias Felleisen 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 w

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

2012-12-10 Thread Matthias Felleisen
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). We have thought about this for the student languages on and off. And in the end I have always come to the conclusion that students must find ou

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

2012-12-10 Thread Carl Eastlund
I don't like this idea for Racket. The macros "and" and "or" do not behave like functions any more than "if" does. This isn't Haskell, our functions are eager while our conditional forms are short-circuiting. If we want first-order values that perform conjunction and disjunction, but eagerly, we

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

2012-12-10 Thread J. Ian Johnson
I just made a pull request for making and/or expand to functions that perform and/or following a discussion with stamourv and asumu. Vincent believes these additions should also be made to the student languages, but I thought I'd start a discussion about this before doing that work. What are peo