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

non-strict conditional



Felleisen writes:

   John: you wrote that "a non-strict conditional seems essential, and
   the pre-cpo interpretation of conditional seems a bit contrived." 

   I don't see why a non-strict conditional is necessary if you accept
   higher-order functions (which I am sure you do):
	((strict-if test (lambda () then-exp) (lambda () else-exp)))
   should do the right thing, right? Am I overlooking something?

   -- Matthias

This is exactly what I meant. Although it "works," it seems a bit
contrived to say that the arms of a conditional are functions of
no arguments. Or do you think this is really natural?

More generally, as pointed out by Plotkin in Call-by-name, 
call-by-value and the lambda calculus, TCS 1, 1975,
each evaluation strategy is representable in the other. 
But, as argued in Meyer and Riecke's Continuations may be 
unreasonble, 1988 ACM Lisp and FP, these translations do not 
necessarily preserve all of the properties you would like.

John