From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93127 invoked by alias); 23 Nov 2017 12:51:41 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 93115 invoked by uid 89); 23 Nov 2017 12:51:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=honest X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Nov 2017 12:51:38 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eHqyd-00046A-LH; Thu, 23 Nov 2017 13:51:35 +0100 Received: from 41.81.9.46.customer.cdi.no ([46.9.81.41] helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1eHqyZ-00028r-2n; Thu, 23 Nov 2017 13:51:31 +0100 Subject: Re: Difference in define behaviour between kawa.jar and embedded Scheme example To: Mark Raynsford Cc: kawa@sourceware.org References: <20171122223308.6b39e57d@copperhead.int.arc7.info> <20171123105212.0e8cbd1d@copperhead.int.arc7.info> From: Per Bothner Message-ID: <272ebb79-2749-b158-e922-04940a5789b5@bothner.com> Date: Thu, 23 Nov 2017 12:51:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171123105212.0e8cbd1d@copperhead.int.arc7.info> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q4/txt/msg00043.txt.bz2 On 11/23/2017 11:52 AM, Mark Raynsford wrote: > > OK, thanks. This is something I'm going to be looking into at the > source. As you know, I'm putting together a gratuitously incompatible > subset of the language, so I have no need for compatibility with > tradition. I'd rather get hard errors up front. To be honest, I'd > rather all redefines at the top-level be errors, but I assume this is > something I'm going to have to implement myself. Re-definitions are not allowed in files (modules), but they are allowed in line-by-line mode (a REPL or a file processed with -f). > I actually ran into this behaviour because I was informally testing my > subclasses of Scheme/SchemeCompilation and was surprised that I could > override existing bindings like this (because being able to affect the > internals of existing definitions wasn't the behaviour I was used to > from other Schemes). Surely in most Schemes if f is implemented using gm and g is redefined, then f will use the new definition (at least in a REPL)? -- --Per Bothner per@bothner.com http://per.bothner.com/