Hi Marc et al,
I've been exploring the 90-minutes scheme to c and trying to get my head around it. I think I am pretty close to the aha moment.
I have a question though - Is there any limitation to CPS conversation? As in, are there programs that cannot be transformed such that all calls are tail calls?
If I understood it right - the 90 minutes scheme to C implementation has not taken any short cut and is turning complete - my logic of arriving at this conclusion is simple - you can define functions and call them so it's complete lambda calculus and so turning complete :) - is that correct?
Regards, Kashyap
Afficher les réponses par date
Pardon my typo - I meant Turing complete :) - it was perhaps a case of my subconscious rendering the state of my head :) (Thanks to Bakul for pointing it out). Regards, Kashyap
On Tue, Jul 10, 2018 at 2:54 PM, C K Kashyap ckkashyap@gmail.com wrote:
Hi Marc et al,
I've been exploring the 90-minutes scheme to c and trying to get my head around it. I think I am pretty close to the aha moment.
I have a question though - Is there any limitation to CPS conversation? As in, are there programs that cannot be transformed such that all calls are tail calls?
If I understood it right - the 90 minutes scheme to C implementation has not taken any short cut and is turning complete - my logic of arriving at this conclusion is simple - you can define functions and call them so it's complete lambda calculus and so turning complete :) - is that correct?
Regards, Kashyap
Hi,
On 10/07/18 23:54, C K Kashyap wrote:
I have a question though - Is there any limitation to CPS conversation? As in, are there programs that cannot be transformed such that all calls are tail calls?
There are no limitations, the CPS conversion is a total transformation. The evaluation of any expression in Scheme has necessarily a continuation, the transformation just makes this continuation explicit.
If I understood it right - the 90 minutes scheme to C implementation has not taken any short cut and is turning complete - my logic of arriving at this conclusion is simple - you can define functions and call them so it's complete lambda calculus and so turning complete :) - is that correct?
Basically, yes.
Cheers,