From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeronimo Pellegrini Newsgroups: gmane.lisp.guile.user Subject: Re: cond clause does not allow definitions Date: Wed, 22 May 2024 19:37:02 -0300 Message-ID: <9ff8d2d644823f62e416047582433d2b@aleph0.info> References: <5d1be852da93dd324fdbcaa24ed1b444@aleph0.info> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Damien Mattei , guile-user To: Pierpaolo Bernardi Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu May 23 00:38:09 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9uas-0009Fg-3Q for guile-user@m.gmane-mx.org; Thu, 23 May 2024 00:38:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9uaV-0001Ah-Ty; Wed, 22 May 2024 18:37:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9uaT-0001AR-Bf for guile-user@gnu.org; Wed, 22 May 2024 18:37:33 -0400 Original-Received: from mail.aleph0.info ([66.228.54.186] helo=aleph0.info) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9uaQ-0006kv-30 for guile-user@gnu.org; Wed, 22 May 2024 18:37:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aleph0.info; s=mail; t=1716417422; bh=miKY1KxuE2ZL3nBAEB5hf+df1axCvy697ZnXzTYfCuw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JTbzzPskJDigPOH7nM5Co5CotHHXNh4BWE2GYnauFyBi4Voy+GF195snfQc76VFoq x5xU/PKrQwoQgWXqlJrTWbp98b7Mo+uIlDkKxlYqteG0dNSc/BguOIR84B3AKA5AM6 QeJDgK1QIbxqW+6yAPcbh6G4VVtWvvJOF2gGYmwu5R/qd1EpJm0g0sgXxFMAmi0+W8 uS47+GuAmJQqkD13hyZ09i0tzr0S0Lv1YtQoAxCvTU2Nsu1K3c8HvYNLd3cgwFpYlN pI1wSjnJAijAbkMQNf65AT5KyExqUEcf+j3IM7bOnb9CGazHWvzxCEX4J2WzhtbpIj dFVobtCR73Y6Q== Original-Received: from localhost (localhost [127.0.0.1]) by aleph0.info (Postfix) with ESMTP id D0B4042374; Wed, 22 May 2024 19:37:02 -0300 (-03) Original-Received: from aleph0.info ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavis, port 10024) with LMTP id Ge5KhKV7k8Sa; Wed, 22 May 2024 19:37:02 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aleph0.info; s=mail; t=1716417422; bh=miKY1KxuE2ZL3nBAEB5hf+df1axCvy697ZnXzTYfCuw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JTbzzPskJDigPOH7nM5Co5CotHHXNh4BWE2GYnauFyBi4Voy+GF195snfQc76VFoq x5xU/PKrQwoQgWXqlJrTWbp98b7Mo+uIlDkKxlYqteG0dNSc/BguOIR84B3AKA5AM6 QeJDgK1QIbxqW+6yAPcbh6G4VVtWvvJOF2gGYmwu5R/qd1EpJm0g0sgXxFMAmi0+W8 uS47+GuAmJQqkD13hyZ09i0tzr0S0Lv1YtQoAxCvTU2Nsu1K3c8HvYNLd3cgwFpYlN pI1wSjnJAijAbkMQNf65AT5KyExqUEcf+j3IM7bOnb9CGazHWvzxCEX4J2WzhtbpIj dFVobtCR73Y6Q== Original-Received: from randomnode.info (localhost [127.0.0.1]) (Authenticated sender: je) by aleph0.info (Postfix) with ESMTPA id 2866A42373; Wed, 22 May 2024 19:37:02 -0300 (-03) In-Reply-To: X-Sender: j_p@aleph0.info Received-SPF: pass client-ip=66.228.54.186; envelope-from=j_p@aleph0.info; helo=aleph0.info X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19684 Archived-At: On 2024-05-22 18:07, Pierpaolo Bernardi wrote: > In chez: > >> (cond (else (define x 7) x)) > 7 >> x > 7 > > which looks like a bug to me. You may check if x is defined outside of > the cond expression in the other implementations which do not raise an > error too? Sure! And the result varies a lot! (cond (#t (define x 7) x)) (cond (else (define y 7) y)) | System | A | x | B | y | |-------------|-------|-------|-----------|-----------| | Bigloo | 7 | x | 7 | 7 | | Biwa | 7 | 7 | 7 | 7 | | Chez | error | error | 7 | 7 | | Chibi | error | error | 7 | 7 | | Chicken | 7 | 7 | 7 | 7 | | Cyclone | 7 | error | 7 | error | | Gambit | error | error | error | error | | Gauche | 7 | 7 | 7 | 7 | | Guile | 7 | error | 7 | error | | Kawa | 7 | error | 7 | 7 | | LIPS | 7 | error | error (*) | error (*) | | Loko | error | error | error | error | | MIT | error | error | error | error | | Racket | 7 | error | 7 | error | | Sagittarius | 7 | 7 | 7 | 7 | | Scheme48 | error | error | 7 | 7 | | Scheme 9 | error | error | 7 | 7 | | SCM | 7 | 7 | 7 | 7 | | STklos | 7 | 7 | 7 | 7 | | Tinyscheme | 7 | 7 | 7 | 7 | * LIPS does not recognise the `else` clause when it's the only expression in `cond`. J.