From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: C++ declaration style programming? Date: Thu, 22 Jan 2004 03:24:46 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: <20040121154109.SIFC267436.web02-imail.rogers.com@localhost> Reply-To: ttn@glug.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1074737877 17698 80.91.224.253 (22 Jan 2004 02:17:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Jan 2004 02:17:57 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jan 22 03:17:48 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AjUPk-0004if-00 for ; Thu, 22 Jan 2004 03:17:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjUNz-0003ck-E7 for guile-user@m.gmane.org; Wed, 21 Jan 2004 21:15:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AjUN2-0003ak-Ni for guile-user@gnu.org; Wed, 21 Jan 2004 21:15:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AjUMW-0003J1-E1 for guile-user@gnu.org; Wed, 21 Jan 2004 21:14:59 -0500 Original-Received: from [151.37.48.183] (helo=surf.glug.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AjUMV-0003Hy-Ps for guile-user@gnu.org; Wed, 21 Jan 2004 21:14:28 -0500 Original-Received: from ttn by surf.glug.org with local (Exim 3.35 #1 (Debian)) id 1AjUWU-00050t-00 for ; Thu, 22 Jan 2004 03:24:46 +0100 Original-To: guile-user@gnu.org In-reply-to: <20040121154109.SIFC267436.web02-imail.rogers.com@localhost> (message from Viktor Pavlenko on Wed, 21 Jan 2004 10:41:09 -0500) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 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.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2684 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2684 From: Viktor Pavlenko Date: Wed, 21 Jan 2004 10:41:09 -0500 Using side effects to re-bind a variable within the binding expression of let* sounds like cheating :) well, here's another way to "cheat", i suppose: (defmacro let-false (bindings . body) `(let ,(map (lambda (b) (list b #f)) bindings) ,@body)) usage is something like: (let-false (a b c) 1) => 1 (let-false (a b c) b) => #f (let-false (a b c) (set! a 2) (set! b (+ a (* a a))) (set! a (+ b (* b b))) (list a (not c))) => the answer to life the universe and everything? (let-false (a b c) d) =| ERROR: Unbound variable: d ABORT: (unbound-variable) if "false" is too much of a downer, you can munge to taste of course. "let-pessimistic", "let-oh-why-bother-i-have-a-brain-the-size-of-a-planet". thi _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user