[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eval, tail calls, (current-module), and backward compatibility
From: |
Ludovic Courtès |
Subject: |
Re: Eval, tail calls, (current-module), and backward compatibility |
Date: |
Wed, 18 Jan 2012 23:47:22 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Andy Wingo <address@hidden> skribis:
> On Wed 18 Jan 2012 23:21, address@hidden (Ludovic Courtès) writes:
>
>> Andy Wingo <address@hidden> skribis:
>>
>>> On Wed 18 Jan 2012 22:18, address@hidden (Ludovic Courtès) writes:
>>>
>>>> (('apply (f args))
>>>> (apply (eval f env) (eval args env)))
>>>
>>> This is in primitive-eval (and here, `eval' is locally bound). Mark is
>>> talking about R5RS `eval' (`scm_eval').
>>
>> OK, but ‘scm_eval’ is not recursive, so no wonder it’s not
>> tail-recursive. :-)
>>
>> (I’m confident I’m missing something, but I just fail to see what. ;-))
>
> Hee hee :) The point is that this should loop indefinitely:
>
> (define (loop)
> (eval '(loop) (current-module)))
> (loop)
OK, got it.
TBH, I’d be happy to document the limitation and live with it,
especially since it’s not a regression.
Thanks,
Ludo’.
- Eval, tail calls, (current-module), and backward compatibility, Mark H Weaver, 2012/01/16
- Re: Eval, tail calls, (current-module), and backward compatibility, David Kastrup, 2012/01/17
- Re: Eval, tail calls, (current-module), and backward compatibility, Mark H Weaver, 2012/01/17
- Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility, Mark H Weaver, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/18
Re: Eval, tail calls, (current-module), and backward compatibility, Ludovic Courtès, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility, Ludovic Courtès, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/18
- Re: Eval, tail calls, (current-module), and backward compatibility,
Ludovic Courtès <=
- Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/18
Re: Eval, tail calls, (current-module), and backward compatibility, David Kastrup, 2012/01/21
- Re: Eval, tail calls, (current-module), and backward compatibility, Mark H Weaver, 2012/01/21
- Re: Eval, tail calls, (current-module), and backward compatibility, David Kastrup, 2012/01/21
- Re: Eval, tail calls, (current-module), and backward compatibility, Mark H Weaver, 2012/01/21
Re: Eval, tail calls, (current-module), and backward compatibility, Andy Wingo, 2012/01/23