[Top][All Lists]

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

Re: build-lexical-var vs. -Wunused-variable

From: Ludovic Courtès
Subject: Re: build-lexical-var vs. -Wunused-variable
Date: Wed, 16 Jan 2013 13:17:01 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)


Andy Wingo <address@hidden> skribis:

> On Thu 23 Feb 2012 04:36, Mark H Weaver <address@hidden> writes:
>> Andy Wingo <address@hidden> writes:
>>> On Fri 17 Feb 2012 12:00, address@hidden (Ludovic Courtès) writes:
>>>> Commit f9685f437312ea790981373ddc375b2a26ba9c4f changes
>>>> ‘build-lexical-var’ like this:
>>>>      (define-syntax-rule (build-lexical-var src id)
>>>> -      (gensym (string-append (symbol->string id) " ")))
>>>> +      (gensym (string-append (symbol->string id) "-")))
>>>> This breaks a heuristic used in the ‘unused-variable’ pass, which is
>>>> that identifiers containing white space are likely introduced by a macro
>>>> and can be ignored in unused-variable reports (see ‘gensym?’ in
>>>> ‘tree-il/analyze.scm’).
>>>> OK to change it back?
>>> How about we use `$' instead?  I understand that's how Chez does it.
>>> I'd really rather something that is printable without the #{#} syntax.
>> Now that we have a (pending) patch to avoid printing gensyms to
>> psyntax-pp.scm, does that change your opinion on this?  I tend to agree
>> with Ludovic here.  In general, any character that doesn't require the
>> #{}# syntax is likely to be used by some programs in their identifier
>> names.  It would be a shame if we disabled unused-variable warnings for
>> variables whose name contains a '$', or any other standard identifier
>> character for that matter.
> Is this still a change we should make?

After re-reading the above, I think I’d prefer reintroducing white space
rather than using ‘$’.

What did you have in mind?

Thanks for reminding us of all these issues.  :-)


reply via email to

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