Greets,

On Tue 06 Mar 2012 21:40, [email protected] (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