From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: Dotted pair call argument Date: Tue, 21 Feb 2012 19:41:49 -0500 Message-ID: <87sji3zoky.fsf@netris.org> References: <8762f09tc1.fsf@fencepost.gnu.org> <87d39819mp.fsf@netris.org> <87vcn0ch49.fsf@fencepost.gnu.org> <8762f014ob.fsf@netris.org> <8762f0cbag.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1329871434 23304 80.91.229.3 (22 Feb 2012 00:43:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Feb 2012 00:43:54 +0000 (UTC) Cc: guile-devel@gnu.org To: David Kastrup Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Feb 22 01:43:54 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S00JE-0001t0-Dw for guile-devel@m.gmane.org; Wed, 22 Feb 2012 01:43:52 +0100 Original-Received: from localhost ([::1]:60043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S00JD-0008BW-Tl for guile-devel@m.gmane.org; Tue, 21 Feb 2012 19:43:51 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S00JB-0008BQ-Fp for guile-devel@gnu.org; Tue, 21 Feb 2012 19:43:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S00JA-0006bq-Ee for guile-devel@gnu.org; Tue, 21 Feb 2012 19:43:49 -0500 Original-Received: from world.peace.net ([96.39.62.75]:38218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S00JA-0006bm-62; Tue, 21 Feb 2012 19:43:48 -0500 Original-Received: from 74-94-165-125-newengland.hfc.comcastbusiness.net ([74.94.165.125] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1S00J1-0004DQ-Td; Tue, 21 Feb 2012 19:43:40 -0500 In-Reply-To: <8762f0cbag.fsf@fencepost.gnu.org> (David Kastrup's message of "Tue, 21 Feb 2012 19:05:11 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13922 Archived-At: David Kastrup writes: >> Scheme has a very useful property which your proposed syntax would >> destroy: any valid expression can be substituted for any other valid >> expression, and the result has the same meaning except for the >> substitution. > > guile> (display . (close (current-output-port))) > #guile> > > Now try > > (define x (close (current-output-port))) > (display . x) Admittedly I could have been more clear, but I certainly didn't mean to imply that anything that _looks_ like a valid expression can be replaced. That would be absurd. What I meant is that any _subexpression_ can be replaced with any other valid expression, without changing the meaning of the program in any other way. Whether something is a subexpression depends on its _position_ within the larger expression. In (display close (current-output-port)), even if you write it confusingly in dotted-tail notation, (close (current-output-port)) is _not_ a subexpression, because it is not in subexpression position. The only advantage I see to this proposed syntax is that in some restricted cases it is more aesthetically pleasing. I suspect that most experienced Schemers have at some point wondered why dotted-tail notation is not allowed in procedure calls. I certainly have, but upon further consideration I became convinced that the pitfalls of adopting such an ambiguous and potentially confusing syntax far outweigh the advantages. Thanks, Mark