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: build-lexical-var vs. -Wunused-variable Date: Wed, 22 Feb 2012 22:36:05 -0500 Message-ID: <87k43ez0ey.fsf@netris.org> References: <87ty2p4tct.fsf@gnu.org> <87d39a1qgl.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1329968286 4968 80.91.229.3 (23 Feb 2012 03:38:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Feb 2012 03:38:06 +0000 (UTC) Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Feb 23 04:38:05 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S0PVM-0008RB-S1 for guile-devel@m.gmane.org; Thu, 23 Feb 2012 04:38:04 +0100 Original-Received: from localhost ([::1]:55611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0PVL-0007Ps-Up for guile-devel@m.gmane.org; Wed, 22 Feb 2012 22:38:03 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0PVJ-0007Pc-KM for guile-devel@gnu.org; Wed, 22 Feb 2012 22:38:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0PVI-00027U-Me for guile-devel@gnu.org; Wed, 22 Feb 2012 22:38:01 -0500 Original-Received: from world.peace.net ([96.39.62.75]:39439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0PVI-00027I-KF; Wed, 22 Feb 2012 22:38:00 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1S0PVA-0008Nx-KV; Wed, 22 Feb 2012 22:37:53 -0500 In-Reply-To: <87d39a1qgl.fsf@pobox.com> (Andy Wingo's message of "Sun, 19 Feb 2012 22:08:26 +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:13930 Archived-At: Andy Wingo writes: > On Fri 17 Feb 2012 12:00, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Commit f9685f437312ea790981373ddc375b2a26ba9c4f changes >> =E2=80=98build-lexical-var=E2=80=99 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 =E2=80=98unused-variable=E2=80=99 pa= ss, which is >> that identifiers containing white space are likely introduced by a macro >> and can be ignored in unused-variable reports (see =E2=80=98gensym?=E2= =80=99 in >> =E2=80=98tree-il/analyze.scm=E2=80=99). >> >> 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. Thanks, Mark