From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: What does "lacks a prefix" mean? Date: Sun, 12 Jul 2015 00:42:54 +0200 Message-ID: <87zj32pb81.fsf@nl106-137-147.student.uu.se> References: <1e0ad02f-ca3e-495c-bb85-61f77090d31d@googlegroups.com> <87bnfmqzn2.fsf@kuiper.lan.informatimago.com> <87io9ui67a.fsf@nl106-137-147.student.uu.se> <871tghj720.fsf@nl106-137-147.student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1436654687 25923 80.91.229.3 (11 Jul 2015 22:44:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jul 2015 22:44:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 12 00:44:40 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 1ZE3Vf-0005BB-7s for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2015 00:44:39 +0200 Original-Received: from localhost ([::1]:49201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE3Ve-0007Vt-MF for geh-help-gnu-emacs@m.gmane.org; Sat, 11 Jul 2015 18:44:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE3VS-0007Vo-Ki for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 18:44:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZE3VP-0000Yb-D8 for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 18:44:26 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:41239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE3VP-0000YN-5u for help-gnu-emacs@gnu.org; Sat, 11 Jul 2015 18:44:23 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZE3VN-0004y0-9n for help-gnu-emacs@gnu.org; Sun, 12 Jul 2015 00:44:21 +0200 Original-Received: from nl106-137-156.student.uu.se ([130.243.137.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jul 2015 00:44:21 +0200 Original-Received: from embe8573 by nl106-137-156.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 12 Jul 2015 00:44:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 70 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-156.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:9H5JrtCCiC7veD5d8MahlCOyYAw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:105614 Archived-At: Stefan Monnier writes: >> let* says "I need variables which depend on each >> other" and if they're really not, that >> look strange. > > If let behaved like let* it wouldn't look strange to > you. Many other functional languages dropped the > "simultaneous let" and only kept the equivalent of > let* (or even letrec). > >> And probably it's a bit slower. > > Regarding efficiency, there's no clear winner > between the two. It's basically irrelevant. > >> And non-parallelizable theoretically :) > > In practice neither is easily parallelizable anyway. > And the work needed to auto-convert a "let*" to > a "let" when possible is trivial in comparison to > what's needed to parallelize the code. So again, > it's really irrelevant. Hear? I couldn't have said it better myself. Wait... I couldn't! But let me say a couple of other things: 1) "let" looks better and is faster to type, both in terms of the number of chars used and what those chars are (i.e., no "*" in "let" which is only normal letters). 2) With the let/let* distinction, while let* being the oddball, it sends the signal that the "let" style, and not the one of "let*", is the one preferred. But it is actually the "let*" style that should be favored! It is much more clear and easily navigated. Compare: (setq side 3.0) (let ((cube-volume (* side side side))) cube-volume) vs. (let* ((side 3.0) (side-area (* side side)) (cube-volume (* side-area side)) ) cube-volume) "Dependencies" are the most natural things and aren't anything to be afraid of! Only if you are the manager of a Linux distro they can get out of hands sometimes... 3) "let", if let was let*, would be less thinking in advance since then you wouldn't have to think "so, will I have variables now which will depend on each other?" You'd just type "let" in either case! Likewise, when you modify code long after you first wrote it, you often insert a new variable that is "dependent" on another, and then you have to change the `let' to `let*'. But this is very easy to forget and it is always a silly mistake when it happens. -- underground experts united http://user.it.uu.se/~embe8573