From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: if vs. when vs. and: style question Date: Fri, 27 Mar 2015 13:41:23 +0100 Organization: Informatimago Message-ID: <87sicqzk7g.fsf@kuiper.lan.informatimago.com> References: <87lhilx0cf.fsf@debian.uxu> <87twx9360u.fsf@kuiper.lan.informatimago.com> <0d1d19ab-06e9-462d-8867-9a49b1e232d3@googlegroups.com> <87lhil2io1.fsf@kuiper.lan.informatimago.com> <87zj6zw0wy.fsf@debian.uxu> <21781.3549.847754.15154@mail.eng.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1427460631 17265 80.91.229.3 (27 Mar 2015 12:50:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Mar 2015 12:50:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 27 13:50:29 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 1YbTiM-0000ro-EI for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Mar 2015 13:50:18 +0100 Original-Received: from localhost ([::1]:50066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbTiL-00089k-MB for geh-help-gnu-emacs@m.gmane.org; Fri, 27 Mar 2015 08:50:17 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-X-Trace: individual.net w7ClYcuwsVO0mpM9nM0bEQlweOL1mpAaZEIR2vEpfeNKWH6BYz Cancel-Lock: sha1:ZDQ0ZDRlYzYzYzdiZTg1ZGRiMmRmYmY4Mzk1MzBhMmYzMGMyYmJkZg== sha1:GzLHpSK9aHlvS7RjSUjq4gyiwZk= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:211109 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:103391 Archived-At: writes: > On Fri, Mar 27, 2015 at 08:59:25AM +0100, Gian Uberto Lauri wrote: >> Emanuel Berg writes: >> > (1+ data) vs. (+ 1 data) >> >> I miss the original discussion, my apologies. >> >> In C, increment and decrement operators are meant to use hw processor >> instructions. >> >> Is it the same for the LISP 1+ function? > > That depends on the compiler. OTOH -- for a decent modern compiler, the > code generator would see the same, whether you type (+ 1 foo) or (1+ foo). > > The optimizer is solving much harder problems than that. This holds true > for C as it holds for Lisp or Scheme or whatnot. Definitely. And this would be a good argument to remove/avoid 1+ and 1-. (But remember, in my opinion, those are SUCC and PRED, and therefore their presence represents a more fundamental idea; on the other hand a lisp function named SUCC could like in pascal, obtain the successor character too). Again, one could argue indeed that it's a premature optimization: CL is specified to be able to write very different implementation, very small and simple implementations are possible, as well as very big and very sophisticated ones. Interpreters or compilers are possible. (Already, I feel there is more diversity in CL implementations than in C, even taking into account Cint). Some systems such as ACL2 are based on a subset of CL, using the list notation even for arrays. If we augment generality of principle, can we remove specific and specialized operators. In the end, we can reduce all programming to lambda calculus. There's a whole spectrum and the question is where you put the cursor. -- __Pascal Bourguignon__ http://www.informatimago.com/ “The factory of the future will have only two employees, a man and a dog. The man will be there to feed the dog. The dog will be there to keep the man from touching the equipment.” -- Carl Bass CEO Autodesk