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: Sun, 12 Jul 2015 09:59:48 -0700 (PDT) Message-ID: <54890979-2bf7-4665-b1d6-a147141c3dd1@default> References: <1e0ad02f-ca3e-495c-bb85-61f77090d31d@googlegroups.com> <87bnfmqzn2.fsf@kuiper.lan.informatimago.com> > > <082e0be8-425b-4eff-8473-0c1091628695@default> <87d1zydu5g.fsf@nl106-137-147.student.uu.se> 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 1436720435 8049 80.91.229.3 (12 Jul 2015 17:00:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jul 2015 17:00:35 +0000 (UTC) To: Emanuel Berg , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 12 19:00:15 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 1ZEKbv-000762-Eq for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2015 19:00:15 +0200 Original-Received: from localhost ([::1]:51364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEKbv-0003Rr-17 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2015 13:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEKbj-0003PU-Gm for help-gnu-emacs@gnu.org; Sun, 12 Jul 2015 13:00:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEKbf-0003rW-Bf for help-gnu-emacs@gnu.org; Sun, 12 Jul 2015 13:00:03 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:28169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEKbf-0003r6-4Q for help-gnu-emacs@gnu.org; Sun, 12 Jul 2015 12:59:59 -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 t6CGxvCv016204 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Jul 2015 16:59:57 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 t6CGxvBC024957 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 12 Jul 2015 16:59:57 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t6CGxuVE025833; Sun, 12 Jul 2015 16:59:56 GMT In-Reply-To: <87d1zydu5g.fsf@nl106-137-147.student.uu.se> 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:105640 Archived-At: > > 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 wouldn't want a construct that says "here, there > *might* be dependencies", instead I'd like a construct > that said "here, there *is* a dependency, namely > X depends on Y in terms of Z!" That's precisely the point. I want the latter, not the former. In your text that I elided you seem to have missed the point. It's not about dependencies being somehow bad or dangerous or abnormal. It's about recognizing and understanding them. Precisely, I imagine, why you wrote that you'd appreciate a construct that identifies them for you. So would I. In the absence of that, I identify them for myself, explicitly. When I read code later I often understand it less well than I did when I wrote it (not always, but often enough). So I as writer try to help poor me as reader. `let*' tells you nothing about dependencies, which means more time examining code to understand it. That's the answer to your question, "What does it matter?". To understand code we sometimes need to understand what various parts of it depend on. Believe it or not, you do want (or will someday appreciate) the advantage of knowing - just by looking - where there are binding dependencies, especially if you have many bindings at the same level (and perhaps especially if there are dynamic bindings). If you use only `let*' all the time then you in fact maximize what you claim you "wouldn't want" - something that tells you nothing about where there might be, let alone where there actually are, dependencies. Working code that uses `let', on the other hand, does tell you something useful. Lacking an automatic indication of dependencies (that would be nice), my preference is to do the work myself when writing code, to signal to myself (and any other reader) what my understanding of the code is at that time: * These particular bindings, with `let', are not themselves, as bindings, interdependent. The code would not work if they were (typically you'd get an unbound variable error). * These other bindings, with `let*', _do_ involve at least one dependency - not "might", but "do". The code would not work if `let*' were changed to `let' here (e.g., unbound variable error). It's the "the code would not work" part that makes this convention a bit more useful than, say, comments about the writer's understanding of what's going on. The stricter the use of the convention, the more surely does `let*' indicate real dependencies. If adhered to strictly then _every_ `let*' binding expresses a real, not just a might-be, dependency. (If you think that `let*' makes every binding depend on those that precede it, think again. `(let* ((a 1) (b 2))...)' does not make b's value depend on a's.) I use `let*' where I know (or think I know) there is a binding dependency, and `let' where I know (or think) there are none. It's about expressing my coding-time understanding, so that a reader has that extra bit of info - info about my thinking, and maybe about the code. Whether my understanding is correct when writing is not the question. At least a reader has the advantage of knowing what I was thinking. That's the point and, yes, it can really help. It helps me, as writer and reader of my code. Separating the two this way lets me know that when I see `let*' I can rely on there being binding dependency, rather than knowing only that there might be. Can `let' also involve dependencies? Of course, especially with dynamic binding. The point is not that the use of this convention makes understanding trivial, cut-and-dried. The point is that understanding what the writer was thinking can help a reader. Throwing everything into one giant `let*' is easy, and things might seem to just work (no pesky unbound variable errors), but it obscures rather than clarifies what is going on. A coder knows more about the code than what an all-inclusive `let*' can tell a reader, so I express it, to help out. In the absence of language support that does such analysis and proclaims the outcome in the code, I do it manually. YMMV. You don't have to write your code the way I write mine. And I don't have to read and maintain your code. ;-) I do what I do because it helps me. I describe it here because I think it could help others, even you.