From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.lisp.guile.user Subject: Re: Re: intern a top level variable Date: Sun, 20 Aug 2023 15:56:15 +0200 Message-ID: References: <5306923bbfa46630b22c6dc978e89b60d0565ad9.camel@abou-samra.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-k4FHnPHyx4ZjsfrOyFXS" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1707"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Cc: guile-user@gnu.org, tomas@tuxteam.de To: Mortimer Cladwell Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Aug 20 15:56:55 2023 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 1qXivH-0000Iv-G9 for guile-user@m.gmane-mx.org; Sun, 20 Aug 2023 15:56:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXius-0002T3-VK; Sun, 20 Aug 2023 09:56:32 -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 1qXiun-0002RF-R2 for guile-user@gnu.org; Sun, 20 Aug 2023 09:56:25 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXiuk-0001WP-V8 for guile-user@gnu.org; Sun, 20 Aug 2023 09:56:25 -0400 Original-Received: from [172.20.10.5] ([37.169.148.220]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.103]) with ESMTPSA (Nemesis) id 1Ml6i4-1ptC2f17u8-00lUiG; Sun, 20 Aug 2023 15:56:17 +0200 In-Reply-To: X-Provags-ID: V03:K1:8a0XChONRjjpbsEfWFEKLFWTeyVyyvAkT63a4YR2CKgDNYmQEWa 4dHi1CQEediwZihOlB/2hY2gZSng4dS5N/hIDVSXNTkGWqR0J4un0SeM707r/QW92vP04dS fyJ86T13eCwn0fjYUOcmqTK00+LczWQ3PEw9fN9++0mjqiRWCTs1P0tPgPB4fWh+3updnNB aMvoDQOk4T7MW1SSjVQJA== UI-OutboundReport: notjunk:1;M01:P0:QMQzv3u+M6I=;096eST2Nqap80huPys3MT9itq4k uITrU5fpm3gvh0x+REupUiXzRgFHCGQ1yHDPeFMk7IAb1auTKjfW6xKtZHPNKPCdt19d3aCHf 40BsnM2aah7D62UJnrBbLc2fBadgFdQEs08q2fQx+U5PlzzU0NNc4mpU5h1L2c9tVAxYjahH/ 5f6vuj2mQ8Xjiis01IG/367nyWHqC+64Dt9qd0JYx9RYRIg0Ugg2tOqJpnRcwRzgqKhr4dBJ0 ixKsCAMiNc5KhBk1hP7j72Ar1z6h9ELwVSRKrpZSKoSJWxHwCazflYi4v/jeqm8RZl6BUUxCz 97mmT5JUCAHlaIWa1mWRaGJbm9My0Y4PQHEHL9QlJfYRYDyzCoZ7/XjyKDoA9+CzGZIecNQ8y QgwoGjKteHKBOZWuyBLVP18k98cn905WXG2JBnQqcOkjPvHMRZZ7jUinH8JyZ/SW2Y0eLizFr y21P8r5DQVziIpM+167f62cVL+3XB7JimN+kWgWfdUCWhmTB6Xl5/h1lQZ+/zdcxJeoABDrMj IKaLXb5vnEBWt3diholwxBjUyjh8jpoXVjPYdj1DRE6omgDWxPsIJxqYxC1Y8JQtEPwABKtTZ 18/ki/KsBpMcVsZIw+bLzrt+BUdlB7fldElg7HwBxEyqekIntXad+t17Nyn4OQWDZDfJlE09w 8H+6ItKaaTrTXdh1d917a7ZLXmNlNvM3ExaLh4IdV8zAntKfYqn4D3AxKHIfd8eiDr4geDgRF E4b40qErWZ4t5Bp0+M5Kxcceu7SmtrelijRdMHK3WTlvG+XoPkliNKRj2SImIRjO+uVe4/TC Received-SPF: pass client-ip=212.227.126.133; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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:19175 Archived-At: --=-k4FHnPHyx4ZjsfrOyFXS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mercredi 16 ao=C3=BBt 2023 =C3=A0 15:17 -0400, Mortimer Cladwell a =C3= =A9crit=C2=A0: > I would like to define a variable within a method but make it available t= o the > entire module - globally. [...] > So yes I will need to read more about interning. OK, so the reason we were all confused is that "interning" is an unrelated concept that has absolutely nothing to do with what you were looking for he= re. Symbol interning is what makes this true: (eq? 'foobar 'foobar) Namely, it's the fact that whenever a symbol is created, if there is alread= y another symbol with the same name, that symbol object is reused. It's not the same as defining variables. A symbol is not a variable, just t= he name for a variable. Interning applies to symbols, which also happen to be = the objects used to name variables, but creating a symbol does not create a variable, just like when I say "John is an English name", it doesn't make someone named John appear in the room :) --=-k4FHnPHyx4ZjsfrOyFXS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSZ7TKxnKGyBvBjzBmj8PYLiTOX/gUCZOIbfwAKCRCj8PYLiTOX /m9dAP98M2M/fr1kYeA7Sucwoltlr/Vbx9r3HmWgQITmPFK0TAD/YSEJ6fzRcLEA a2ewLyBhyMiVgVM4CtRBLzAYvrW/0wo= =fBCw -----END PGP SIGNATURE----- --=-k4FHnPHyx4ZjsfrOyFXS--