From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.user Subject: Re: and-let* is not composable? Date: Wed, 11 Sep 2013 15:05:04 +0100 Message-ID: <8761u7o3n3.fsf@Kagami.home> References: <87li34mue7.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378908329 26507 80.91.229.3 (11 Sep 2013 14:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Sep 2013 14:05:29 +0000 (UTC) Cc: "guile-user@gnu.org" To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Sep 11 16:05:33 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJl2y-0004rG-Ka for guile-user@m.gmane.org; Wed, 11 Sep 2013 16:05:32 +0200 Original-Received: from localhost ([::1]:36149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJl2y-0002FX-3h for guile-user@m.gmane.org; Wed, 11 Sep 2013 10:05:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJl2k-0002E1-Ks for guile-user@gnu.org; Wed, 11 Sep 2013 10:05:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJl2e-0003lx-RK for guile-user@gnu.org; Wed, 11 Sep 2013 10:05:18 -0400 Original-Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:53577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJl2e-0003lq-HU for guile-user@gnu.org; Wed, 11 Sep 2013 10:05:12 -0400 Original-Received: by mail-wg0-f53.google.com with SMTP id x12so5586631wgg.8 for ; Wed, 11 Sep 2013 07:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:mail-followup-to:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=APZ0TKFVJVe9+bHGLF4EAfFVX9TnzjgTlvcMYYAuDAw=; b=vhBzHeG453t5XD/cpmuZZ1nx5cVQ/BX9FiLxIx5qmWPuG/wgXNp6xGb2uTEgOnz+e+ GFdQpXAZ/0TI5OWrCIGLWLWMHZ2aZhHRr9FekxEScwANj5a9P3MGAs+fee5bnsZpADF/ MW3ZsU0cgthSgkx16kZwzrkJJ4fvM4rlAxopXrKrzHPH+BSdYQGEvThssD55fzgK2ViX k7g5QAQAgZeip37QCQX+juDsCI+oKF8Ykxe05DfGmThZd5zKwM/v8sI4X/tF4IsKWeSY mwyle2Dy+rNDcQkM77vjXoMpsZ/LCmOn5YpiCXT+mW7OyDuv08dM1r1AfBuCSOLa2Fd9 txGg== X-Received: by 10.194.250.6 with SMTP id yy6mr1685332wjc.13.1378908310202; Wed, 11 Sep 2013 07:05:10 -0700 (PDT) Original-Received: from Kagami.home (host81-155-242-94.range81-155.btcentralplus.com. [81.155.242.94]) by mx.google.com with ESMTPSA id mz14sm10889412wic.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Sep 2013 07:05:09 -0700 (PDT) Mail-Followup-To: Panicz Maciej Godek , "guile-user\@gnu.org" In-Reply-To: (Panicz Maciej Godek's message of "Wed, 11 Sep 2013 14:25:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::235 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10794 Archived-At: Panicz Maciej Godek writes: > That's not entirely true. I just need an extra pair of parentheses > to do so. The semantics is certainly different than the one of > Guile's curried definitions, but that's fine. An identifier macro would be even better, but it's still not first class. > Well, while syntax-rules macros are quite easy to understand > (at least from the user's point of view), although sometimes a little > tricky, the syntax-case system I find still too difficult to use. > define-macro, on the other hand, is very easy to explain > even to beginner programmers, although the resulting macros > are much more difficult to analyse. If you, or the other people who are confused by syntax-case, can point to the parts of the manual that confuse you, so we can clear them up, I think we'd all appreciate it. Fundamentally, syntax-case shouldn't be harder to use than define-macro 99% of the time, if you remember - macros are functions from "syntax-objects" to syntax-objects - syntax-objects are smart symbols - syntax->datum to remove the smartness - datum->syntax is for when you want to break hygiene (but syntax parameters are better where applicable) - use quasisyntax to construct lists of syntax-objects instead of quasiquote to construct lists of symbols. > The main problem with syntax-rules/syntax-case macros is > the treatment of ellipses, which makes it difficult to create > macros that create macros. You can expand into ellipses with (... ...), it's ugly, but it's there. > with a good name for that macro (and if so, the Guile's curried > definitions are not curried either, at least in general: because > you can (define ((f a b) c d) ...), getting a chain of 2-argument > functions) Indeed, I wasn't sure whether or not I should have mentioned it, but I was told this is the "correct" name for that feature on comp.lang.scheme a while back. I think it might have been Will Clinger, but I'd need to double check. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"