From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile: What's wrong with this? Date: Wed, 04 Jan 2012 18:49:13 +0100 Organization: Organization?!? Message-ID: <874nwbgxye.fsf@fencepost.gnu.org> References: <4F027F35.5020001@gmail.com> <1325603029.22166.YahooMailNeo@web37906.mail.mud.yahoo.com> <4F032C41.3070300@gmail.com> <877h17hjj2.fsf@netris.org> <1325687351.71432.YahooMailNeo@web37906.mail.mud.yahoo.com> <874nwbs9c4.fsf@pobox.com> <87hb0bgzkt.fsf@fencepost.gnu.org> <87r4zfqsph.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1325699423 22879 80.91.229.12 (4 Jan 2012 17:50:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2012 17:50:23 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jan 04 18:50:20 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RiUyc-0004xl-AG for guile-devel@m.gmane.org; Wed, 04 Jan 2012 18:50:14 +0100 Original-Received: from localhost ([::1]:43184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiUyb-0004Xp-PW for guile-devel@m.gmane.org; Wed, 04 Jan 2012 12:50:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiUyY-0004PY-D2 for guile-devel@gnu.org; Wed, 04 Jan 2012 12:50:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RiUyX-0003wR-3f for guile-devel@gnu.org; Wed, 04 Jan 2012 12:50:10 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:58877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RiUyW-0003wN-RA for guile-devel@gnu.org; Wed, 04 Jan 2012 12:50:09 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RiUyW-0004tK-4t for guile-devel@gnu.org; Wed, 04 Jan 2012 18:50:08 +0100 Original-Received: from p508ec2ac.dip.t-dialin.net ([80.142.194.172]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jan 2012 18:50:08 +0100 Original-Received: from dak by p508ec2ac.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jan 2012 18:50:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508ec2ac.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:6++iJ3AOA680wfzUNk+71iCd5vM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:13277 Archived-At: Andy Wingo writes: > On Wed 04 Jan 2012 12:14, David Kastrup writes: > >> Andy Wingo writes: >> >>> We could add a compiler option to turn string literals into >>> (string-copy FOO). Perhaps that's the thing to do. >> >> What for? It would mean that a literal would not be eq? to itself, a >> nightmare for memoization purposes. > > (eq? "hello" "hello") > > This expression may be true or false. It will be true in some > circumstances and false in others, in all versions of Guile. To itself. Not to a literal written in the same manner. (define (zap) "hello") (eq? (zap) (zap)) This expression may not choose to be true or false. >> And for what? For making code with explicitly undefined behavior >> exhibit a particular behavior that is undesirable in general. > > The Scheme reports and the Guile manual are both positive and negative > specification: they require the implementation to do certain things, > and they allow it to do certain others. Eq? on literals is one of the > liberties afforded to the implementation, and with good reason. > Correct programs don't assume anything about the identities (in the > sense of eq?) of literals. Of _different_ literals spelled in the same way. But one and the same literal has to be eq? to itself. It can't just replace itself with a non-eq? copy on a whim. -- David Kastrup