From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: Eval, tail calls, (current-module), and backward compatibility
Date: Wed, 18 Jan 2012 23:47:22 +0100 [thread overview]
Message-ID: <87y5t4pr0l.fsf@gnu.org> (raw)
In-Reply-To: <87ty3sejee.fsf@pobox.com> (Andy Wingo's message of "Wed, 18 Jan 2012 23:27:21 +0100")
Andy Wingo <wingo@pobox.com> skribis:
> On Wed 18 Jan 2012 23:21, ludo@gnu.org (Ludovic Courtès) writes:
>
>> Andy Wingo <wingo@pobox.com> skribis:
>>
>>> On Wed 18 Jan 2012 22:18, ludo@gnu.org (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’.
next prev parent reply other threads:[~2012-01-18 22:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 3:28 Eval, tail calls, (current-module), and backward compatibility Mark H Weaver
2012-01-17 11:02 ` David Kastrup
2012-01-17 21:02 ` Mark H Weaver
2012-01-18 9:36 ` Andy Wingo
2012-01-18 19:58 ` Mark H Weaver
2012-01-18 21:52 ` Andy Wingo
2012-01-18 21:18 ` Ludovic Courtès
2012-01-18 22:01 ` Andy Wingo
2012-01-18 22:21 ` Ludovic Courtès
2012-01-18 22:27 ` Andy Wingo
2012-01-18 22:47 ` Ludovic Courtès [this message]
2012-01-18 22:56 ` Andy Wingo
2012-01-21 15:59 ` David Kastrup
2012-01-21 18:28 ` Mark H Weaver
2012-01-21 18:33 ` David Kastrup
2012-01-21 19:06 ` Mark H Weaver
2012-01-23 10:41 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5t4pr0l.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).