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: foreign objects and the garbage collector Date: Tue, 21 Sep 2021 20:49:55 +0200 Message-ID: References: <42b93d9ba50eceff320f3dde53ffd6ad77ab6070.camel@planete-kraus.eu> <87czp4h1un.fsf@laura> <5461c5ead3388c6e678eb8028b1f5f1d268520bd.camel@telenet.be> <521d6bea5b77a644e2e9efe16e35cc2d0c53775c.camel@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-0f/zgugosKnf0HVWMcxV" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27960"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 To: adriano , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Sep 21 20:51:03 2021 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 1mSkr7-00072Z-Tt for guile-user@m.gmane-mx.org; Tue, 21 Sep 2021 20:51:01 +0200 Original-Received: from localhost ([::1]:33940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSkr6-0005sh-B8 for guile-user@m.gmane-mx.org; Tue, 21 Sep 2021 14:51:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSkqc-0005mt-RR for guile-user@gnu.org; Tue, 21 Sep 2021 14:50:30 -0400 Original-Received: from andre.telenet-ops.be ([2a02:1800:120:4::f00:15]:54230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSkqZ-0002Eh-E3 for guile-user@gnu.org; Tue, 21 Sep 2021 14:50:29 -0400 Original-Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by andre.telenet-ops.be with bizsmtp id wiqM2500J0mfAB401iqM1Y; Tue, 21 Sep 2021 20:50:22 +0200 In-Reply-To: <521d6bea5b77a644e2e9efe16e35cc2d0c53775c.camel@riseup.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1632250222; bh=Qnm1iBnX7AoORAU1LE8nw0xvJVmODXMWf/dDhJQEwww=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=WDDuY6DnQVji8Yzw7sBTmyeEuBu+w8dAmpF2jXeW/hwIwdUs9KFSw4DjGujH6QYBO x2bfUvWhzcR3pOiyiPput+KcthXe9PF/+BK6Z+Tkj7WGaxmzaZSUsQlJdexlNN5bCb NLr019N1+hdVfK010L6hFBE2zsQKghuV+V7Tfj74u1gXg+/M1nmshcK20V31PEzRGd EmsGlyJo2A8x5nMNMUmJzcaZsSQp+Ya9Y51G+keVwOic1x74p3/MtLCvQEIx1upMq4 /J+Nx3QBxEzhaMp+0g95f7NbtjCjmYuRurGmsJ21Vovys9VIJcqT7+tabTrnbivGji HbtynqfpxMRww== Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.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, 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-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.lisp.guile.user:17773 Archived-At: --=-0f/zgugosKnf0HVWMcxV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable adriano schreef op di 21-09-2021 om 16:26 [+0200]: >=20 > [...] > Well, it'd be wonderful to have an example of what you're describing > here ! =F0=9F=99=82=EF=B8=8F >=20 > The new exceptions system is still quite obscure =F0=9F=A4=B7=EF=B8=8F Ignoring with-throw-handler, raise-continuable and pre-unwind handlers, it'= s the same mechanism as in Java or Python, though with different syntax, and unlike Java, Guile doesn't have =E2=80=98finally=E2=80=99: ;; Can also be implemented with the old 'catch' -- 'catch' isn't disappeari= ng. (guard (c (#t (close-resource-unless-closed the-resource) (raise-exception c))) (define-values return-values (do-stuff)) (close-the-resource-unless-closed the-resource) (apply values return-vales)) Greetings, Maxime --=-0f/zgugosKnf0HVWMcxV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUopUxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jAQAP9u+BxTTBUtaeSxTYBTJxnA23OZ XGzxhUTZOgRjTe3GewD/dWDJg+ZFi6RY/VTcFwKRd9BQQa07Moj8Nad9JppRNQ4= =d1ae -----END PGP SIGNATURE----- --=-0f/zgugosKnf0HVWMcxV--