From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.user Subject: RE: with-syntax return error in Guile, not in Kawa or Racket Date: Mon, 6 May 2024 20:58:39 +0200 Message-ID: <20240506205840.Kuyd2C00E17cfcj01uyfo5@xavier.telenet-ops.be> References: <8a27bbf6579a8f3676ee16ad70afca2efbec2686.camel@abou-samra.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18325"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: Damien Mattei , Jean Abou Samra Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon May 06 21:04:22 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 1s43dJ-0004Vc-KZ for guile-user@m.gmane-mx.org; Mon, 06 May 2024 21:04:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s43cw-0000i6-Pw; Mon, 06 May 2024 15:03:54 -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 1s43cu-0000gp-CM for guile-user@gnu.org; Mon, 06 May 2024 15:03:53 -0400 Original-Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s43cs-0007zK-41 for guile-user@gnu.org; Mon, 06 May 2024 15:03:52 -0400 Original-Received: from [IPv6:2a02:1808:82:d939:35a7:a876:c7fe:1afe] ([IPv6:2a02:1808:82:d939:35a7:a876:c7fe:1afe]) by xavier.telenet-ops.be with bizsmtp id Kuyd2C00E17cfcj01uyfo5; Mon, 06 May 2024 20:58:40 +0200 Importance: normal X-Priority: 3 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1715021920; bh=LgfrjR94a4MBwnX1JFvHPxbPsaGAHztmNqQLzpPz2Q4=; h=To:Cc:From:Subject:Date:In-Reply-To:References; b=HlSS4bOn2mihTUXHEblwXUqAeeMU5jLKGBJLt8wClZrfHETbnMC+OJgbD7blqdWUD RYEEiTgGqiNz3aiaoAb2AkSoBKN0e4Fg+VSCFuuvuFtUcFWb7u3eF8Km4mL/c5L4VM MJmTIzfYVAD5Ki8v/jP7Bk3FwNeIjKbaEbRUp205O8ThiRWiYdFzAMaWaEXu0dVS4d vI/zKb6/OUo1AhqmXg311jGmBEEo0/5t9TPLpHAJOgwTTchNNBlhHeoJD1DLQRAY55 Ld3e+CeSvt8fLqY8/CfmgHfXZ5pIlSuqdbrzCp8je5/pAw0vpqVzcstLTb0aAYKbSr NIGxwlq2fH8ew== Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:19601 Archived-At: > [...] > > That should work, but it's also non-hygienic. For example, it will > be affected if the user does > > (let ((list ...)) > (call-your-macro ...)) > >> and since you use #f in the datum->syntax call, it will also strip away >> all hygiene annotations from the args-brackets, causing problems inside >> that as well. >> >i changed #f to stx in the macro That doesn=E2=80=99t make it hygienic, for the reasons mentioned above. syntax (#') / quasisyntax (#`)/ unsyntax (#,) and unsyntax-splicing (#,@) = your friend =E2=80=93 they behave pretty much the same as their quote/quasi= quote/... counterparts. Hygiene is usually pretty simple =E2=80=93 just don=E2=80=99t do sexp thing= s (say, quasiquote), do syntax things (quasisyntax) instead, then typically= things will go well. Best regards, Maxime Devos.