transparent lambda

Peter Levart peter.levart at marand.si
Fri Jan 8 02:02:29 PST 2010


On Friday 08 January 2010 08:50:19 Peter Levart wrote:
> for example this:
> 
> label:(
>   if (a < b) break label : -1;
>   if (a > b) break label : 1;
>   break label : 0;
> )
> 
> is equivalent to this:
> 
> (int retval; label:{
>   if (a < b) { retval = -1; break label; }
>   if (a > b) { retval = 1; break label; }
>   { retval = 0; break label; }
> } retval)
> 

I have a feeling that this might be it (provided that it is acceptable). With this we can satisfy both camps:

The ones that want to take the "blue pill" can go back to their simple safe and beautifull world of local return in the form of statement lambda.

The others that want to take the "red pill" will get nothing but the pure transparent "truth" with no missing features.

Peter


More information about the closures-dev mailing list