unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel@gnu.org
Subject: Re: build-lexical-var vs. -Wunused-variable
Date: Thu, 01 Mar 2012 19:26:03 +0100	[thread overview]
Message-ID: <87hay89o04.fsf@gnu.org> (raw)
In-Reply-To: <87k43ez0ey.fsf@netris.org> (Mark H. Weaver's message of "Wed, 22 Feb 2012 22:36:05 -0500")

Hello!

Mark H Weaver <mhw@netris.org> skribis:

> Andy Wingo <wingo@pobox.com> writes:
>> On Fri 17 Feb 2012 12:00, ludo@gnu.org (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.

Any news on this?  I’d agree with Mark, but no strong opinion here.

Thanks,
Ludo’.



  reply	other threads:[~2012-03-01 18:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 11:00 build-lexical-var vs. -Wunused-variable Ludovic Courtès
2012-02-19 21:08 ` Andy Wingo
2012-02-23  3:36   ` Mark H Weaver
2012-03-01 18:26     ` Ludovic Courtès [this message]
2013-01-16 10:40     ` Andy Wingo
2013-01-16 12:17       ` Ludovic Courtès
2013-01-16 12:27         ` Andy Wingo
2013-01-16 14:25           ` Ludovic Courtès

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=87hay89o04.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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).