Re: call-time choice vs partial application?

From: Claus Reinke <claus.reinke_at_talk21.com>
Date: Fri, 04 May 2007 22:53:28 +0100

> In Sloth, we don't allow partial applications to be in NF, so it returns "No
> result" > Allowing them, the result is (somewhat simplified):
>
> ((wrap (_8596=:=,0),_8596),(b_lambda_e_lambda0 _8670,_8670))

i don't quite understand the (_8596=:=,0) part - is that an artifact of
the simplification you mention, or has the system committed to 0?
 
> So I think it behaves as you expected.

thanks! it is good to know that i'm not alone;-)

btw, am i the only one who thinks that 'call-time choice' is a bit of
a misnomer, and its description in the report slightly misleading, for
a call-by-need language?

in call-by-need, functions are called without touching the parameters,
which are only evaluated and substituted when needed. in the Curry
report, the informal definitions suggest (to me, at least;-) that 'call'
refers to the function whose parameters involve choices, with choices
for all parameters being made before the function can be entered/called.

whereas, in reality, parameter choices - just like evaluation - are only
performed just before parameter substitution, which is only performed
if a parameter is needed in the function body.

contrary to what the name and the informal definition suggest, in a
call like 'const 1 (0?2)', no choice is made for the second parameter
of function 'const' at call time, or ever. choices only propagate
outwards out of strict contexts. and in a call like 'const (0?2) 1', the
choice for the first parameter is not made at call time, but at run time
of 'const', just before substitution.

wouldn't it be more suggestive to speak of pre- vs post-substitution
choice, or of shared vs copied choice?

regards,
claus


_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Sun May 06 2007 - 17:56:00 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 18 2019 - 07:15:06 CEST