From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: giving `setq-local' the same signature as `setq' Date: Thu, 19 Mar 2015 08:39:39 -0700 (PDT) Message-ID: <7455a7dd-8c32-4681-95a0-6d09f50ac169@default> References: <0471cc2e-84d4-4a15-88b6-92a980e2949e@default> <87bnjp3tkv.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1426779625 19253 80.91.229.3 (19 Mar 2015 15:40:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2015 15:40:25 +0000 (UTC) Cc: Jordon Biondo , emacs-devel@gnu.org, rms@gnu.org, Stefan Monnier To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 19 16:40:12 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YYcYC-0001eB-42 for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2015 16:40:00 +0100 Original-Received: from localhost ([::1]:39763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcYA-0003MV-GV for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2015 11:39:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcY1-0003M5-Mh for emacs-devel@gnu.org; Thu, 19 Mar 2015 11:39:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYcXw-00076y-NL for emacs-devel@gnu.org; Thu, 19 Mar 2015 11:39:49 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:41730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYcXw-00076i-GG; Thu, 19 Mar 2015 11:39:44 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t2JFdfrK032644 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Mar 2015 15:39:41 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t2JFde3x016429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 19 Mar 2015 15:39:41 GMT Original-Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t2JFddaJ019967; Thu, 19 Mar 2015 15:39:39 GMT In-Reply-To: <87bnjp3tkv.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184020 Archived-At: > > You do? Pray tell, in what way is it a misfeature? Nothing has > > been said to elucidate this, so far - it has only been asserted. > > > > IMHO, it is a feature, giving users the choice. >=20 > Choice leads to inconsistency. Bof. http://en.wikipedia.org/wiki/Self-Reliance and search for "hobgoblin". > I very much prefer the only-one-variable-per-setq style. You're in luck then. You have the choice. ;-) You can do the same for `let*', if you like: (let ((foo fooval)) (let ((phlop phlopval)) (let ((toto totoval)) ...))) > It shows much more clearly where the variable is. Where the variable is? How so? (Where is it? Where's Waldo?) > It also gives an anchor to quickly navigate to the variable > to get its value. How so? Please elaborate. > In a setq list of 10 items, by item 5 it is already unclear which is the > variable and which is the value. In my opinion, it's not worth > complicating the code maintenance just to save a few chars. This is why it is good that you have the choice. I find it clearer to let `setq' do the grouping, instead of implicit or explicit `progn'. But I put each var & value pair on a separate line: (setq foo fooval phlop phlopval ; Maybe this one needs a comment. toto totoval) I don't do this to save characters (e.g. for typing). I do it to make the code clearer and maintenance less error prone and easier. For me, at least.