From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: Eval, tail calls, (current-module), and backward compatibility Date: Sat, 21 Jan 2012 14:06:14 -0500 Message-ID: <87ty3oub89.fsf@netris.org> References: <87lip70zz7.fsf@netris.org> <87ty3pjbcl.fsf@fencepost.gnu.org> <87y5t0ucyc.fsf@netris.org> <8762g4kir3.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327172835 19995 80.91.229.12 (21 Jan 2012 19:07:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2012 19:07:15 +0000 (UTC) Cc: guile-devel@gnu.org To: David Kastrup Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 21 20:07:11 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RogHP-0007PA-4Q for guile-devel@m.gmane.org; Sat, 21 Jan 2012 20:07:11 +0100 Original-Received: from localhost ([::1]:52751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RogHO-0001cv-BB for guile-devel@m.gmane.org; Sat, 21 Jan 2012 14:07:10 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RogHL-0001cf-If for guile-devel@gnu.org; Sat, 21 Jan 2012 14:07:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RogHK-0008In-9s for guile-devel@gnu.org; Sat, 21 Jan 2012 14:07:07 -0500 Original-Received: from world.peace.net ([96.39.62.75]:36438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RogHK-0008Ij-4h; Sat, 21 Jan 2012 14:07:06 -0500 Original-Received: from c-98-216-245-176.hsd1.ma.comcast.net ([98.216.245.176] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1RogHE-00037w-Fh; Sat, 21 Jan 2012 14:07:00 -0500 In-Reply-To: <8762g4kir3.fsf@fencepost.gnu.org> (David Kastrup's message of "Sat, 21 Jan 2012 19:33:52 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13619 Archived-At: David Kastrup writes: > Mark H Weaver writes: > >> Remember, (current-module) is a compile-time concept, not a run-time >> concept. I should clarify this statement. (current-module) is used by the code that's doing the compiling (e.g. the REPL), _not_ by the code that's being compiled. It is a run-time variable used by REPLs and compilers to keep track of which module should be used to compile the next form. > Then current-module should probably be a macro, not a function. In > which case the tail call problem would take care of itself. A core syntax form to retrieve the module name baked into a given identifier (a constant) would probably be useful, and indeed I suspect we'll have it in 2.0.4 because it'll be needed for Andy's implementation of `local-eval'. However, that's a different concept from (current-module), therefore it would need a different name. To understand (current-module), please read my first post in this thread. It would make no sense as a macro. Mark