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: Inconsistent 'return value' for definitions Date: Sun, 29 Jan 2012 17:38:17 -0500 Message-ID: <87pqe2jfs6.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1327876782 13740 80.91.229.3 (29 Jan 2012 22:39:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Jan 2012 22:39:42 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 29 23:39:42 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 1RrdPP-0001fI-Un for guile-devel@m.gmane.org; Sun, 29 Jan 2012 23:39:40 +0100 Original-Received: from localhost ([::1]:36205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrdPP-000257-2w for guile-devel@m.gmane.org; Sun, 29 Jan 2012 17:39:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrdPI-00024o-TY for guile-devel@gnu.org; Sun, 29 Jan 2012 17:39:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrdPG-0004Xx-9L for guile-devel@gnu.org; Sun, 29 Jan 2012 17:39:32 -0500 Original-Received: from world.peace.net ([96.39.62.75]:60530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrdPG-0004Xm-6Y for guile-devel@gnu.org; Sun, 29 Jan 2012 17:39:30 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1RrdPB-0005iY-F4; Sun, 29 Jan 2012 17:39:25 -0500 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:13737 Archived-At: Hello all, I think the following behavior is inconsistent and undesirable: scheme@(guile-user)> (list (compile '(define foo 3))) $1 = (#) scheme@(guile-user)> (list (primitive-eval '(define foo 3))) $2 = (#) It doesn't really make sense for 'define' to return a value, because it cannot be used in expression context. AFAICT, the only way to get this 'return value' is to call 'eval' or 'primitive-eval'. This weirdness has bitten Paul Smith in his efforts to port his code to Guile 2. I think we should change 'define' to always "return" SCM_UNSPECIFIED, at least in 2.2. We might also consider nipping this in the bud and making the same change in 2.0.4. Thanks, Mark