Am Mittwoch, den 24.11.2010, 18:53 +0100 schrieb Felix: > From: Jörg "F. Wittenberger" <[email protected]> > Subject: Re: [Chicken-users] handling the undefined value > Date: Mon, 22 Nov 2010 15:08:46 +0100 > > > Have a compiler switch (since it may break some code), which changes the > > code to return zero values instead of the distinguished undefined value. > > I don't think this is a great idea: this will change the > semantics of code using call-with-values,
So far I did not come around to test, whether or not I'll be able to find my undefined value with the new scrutinizer version. Otherwise I'm aware that this would change semantics. Hence I'd only propose it as a switch. > will be less efficient, This however I don#t understand. Why would it be less efficient to call a continuation with zero instead of one value? If we had a #define C_kontinue0(k) ((C_proc1)(void *)C_u_i_car(k))(1, (k)) and the compiler would spit out that instead of C_kontinue(k, C_SCHEME_UNDEFINED) ??? > and may throw errors in some cases Hell, yes! That's what I want from the switch: throw errors in those cases where I try to bind a variable to undefined. cheers /Jörg _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
