From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: What does "lacks a prefix" mean? Date: Thu, 9 Jul 2015 08:33:07 -0700 (PDT) Message-ID: <082e0be8-425b-4eff-8473-0c1091628695@default> References: <<1e0ad02f-ca3e-495c-bb85-61f77090d31d@googlegroups.com> <87bnfmqzn2.fsf@kuiper.lan.informatimago.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 1436456042 7392 80.91.229.3 (9 Jul 2015 15:34:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jul 2015 15:34:02 +0000 (UTC) To: Barry Margolin , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 09 17:33:44 2015 Return-path: Envelope-to: geh-help-gnu-emacs@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 1ZDDpW-0001Rm-Ts for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jul 2015 17:33:43 +0200 Original-Received: from localhost ([::1]:40485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDDpW-0003fz-8n for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Jul 2015 11:33:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDDp9-0003We-CW for help-gnu-emacs@gnu.org; Thu, 09 Jul 2015 11:33:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDDp1-0004PF-P0 for help-gnu-emacs@gnu.org; Thu, 09 Jul 2015 11:33:19 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:37399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDDp1-0004P4-IR for help-gnu-emacs@gnu.org; Thu, 09 Jul 2015 11:33:11 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t69FX8AD028685 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Jul 2015 15:33:08 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t69FX8ao012016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 9 Jul 2015 15:33:08 GMT Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t69FX8Zo003452; Thu, 9 Jul 2015 15:33:08 GMT In-Reply-To: <> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] 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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105563 Archived-At: > > Actually I see no harm using let* all the time. Harm? Why would *harm* be the only useful or the most useful criterion? There's no harm in writing Lisp with no whitespace at all, except for that needed to distinguish tokens such as symbols and numbers. And in fact I once had a colleague (an expert Lisper, BTW) who wrote Lisp that way, always - no newline chars, no indentation, no spaces or tabs at all, except what was needed by the interpreter or byte-compiler to disambiguate the code. No one else wanted to read, let alone modify his code, but hey, no "harm" done, right? He wrote his code at lightning speed, hardly looking at it. And his code was *good* code - for the applications and the machine. It just wasn't very good for humans (other than himself, arguably, and I'm not sure he didn't shoot himself in the foot sometimes). > This is a frequent subject of style arguments. >=20 > As far as the computer is concerned, there should be no problem > with using let* all the time. But to human readers, it makes a > difference. Indeed, that is the point. (Though I don't entirely agree with your description of the difference it makes to human readers, quoted next.) > Some of us view the * as being a red flag, warning the reader that > something unusual is being done. We'll then expend more mental > energy looking for the dependencies. let is the "normal" method, > let* is "special". I would say this about using `let' vs `let*' wrt what they indicate to human readers: `let' indicates that the bindings are independent; `let*' signals that they might be dependent. I don't see a red flag from `let*', but yes, it does make me pay attention and look for dependencies. That "might be" is where I agree with Barry: `let*' makes you look for whether each binding after the first might in fact be dependent on a previous one from the same `let*'. It's a huge load off one's mind knowing that the bindings of a `let' are independent. Similarly, it is a great help to know, from `let*', to look for how the bindings are actually related. The problem with using `let*' all the time ("harm", actually) is the problem of affixing the same **WARNING** label to absolutely everything - it loses all power to draw attention to anything. If everwhere might involve binding dependencies then you have no signal to watch for them. You need to always be on the alert - or never. I start with `let', and I change to `let*' only when the logic dictates it, i.e., when I introduce a dependent binding. That way I know that if I see `let*' there is a dependency. Does writing this way, privileging `let' when possible, mean more work for the writer? Of course. When things change in the code logic, it can happen that you need to change whether you are using one or the other, or you might even need to add another `let' or `let*' - or you might be able and want to remove one. But saving the writer some maintenance burden is not my priority. Saving the reader some interpretation burden is more important. Why? Because the reader, even when s?he is the same human as the writer, is reading something inherently foreign - s?he is coming at the code from a distance, and is a priori less familiar with it. Even for the same person, time and change of context can provide enough distance that it is no longer immediately clear what is going on or why things were written as they are. (And yes, I even update the code even when it is not absolutely necessary: if there is no longer any dependency then I change a `let*' back to `let'. IOW, I try to keep the code telling me what I want to know about the actual dependencies.) To me, the discovery that, hey, I can write everything using just `let*' and never bother with `let', and following up that discovery with the practice of just using `let*', is the sign of a novice - someone who hasn't yet learned that you don't just write code once and for all. Even "throwaway" code can have a longer life than you might expect. It's about the code long term; it's not about you just now. In sum, to me the problem with such an approach is *not* that it is lazy. The problem is in fact that it is *not lazy enough*. Such an approach shows misguided, short-sighted laziness. True, enlightened laziness takes the longer view: minimize effort and strain (whether manual or mental) over time and across multiple maintainers and other readers. YMMV.