guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-68-gda


From: Andy Wingo
Subject: Re: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.5-68-gdab48cc
Date: Tue, 06 Mar 2012 21:58:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Greets,

On Tue 06 Mar 2012 21:40, address@hidden (Ludovic Courtès) writes:

>> I think the "forward declaration" test was not quite right, because it
>> would not work with a local (define _ gettext).  That's why I changed
>> the test from checking that a warning was issued on a local (define _
>> ...) to change that a warning was not issued on that same case.
>
> Hmm, I see.  Before, in stable-2.0, it would see ‘_’ as an unbound
> variable, and ‘gettext?’ would return #f, instead of #f, right?

Before, it would see that the identifier was bound to a variable in the
current module, so it would take the variable case instead of the
special name case.  Then it would return #f because the variable-ref
failed.

After, if the variable is unbound, it takes the special name case.

That's the mechanism.  But we should talk policy.  This should probably
not emit a warning:

  (begin
    (define _ gettext)
    (format #t (_ "foo")))

And this should:

  (begin
    (define _ not-gettext)
    (format #t (_ "foo")))

But the problem is we can't tell them apart.  So we have to choose
between emitting an incorrect warning and not emitting a correct
warning.  We should do the latter, no?

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]