From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: Re: define anywhere Date: Sat, 05 Jun 2021 17:23:36 +0200 Message-ID: References: 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="35668"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-519-g27a961944e-fm-20210531.001-g27a96194 To: "Damien Mattei" , guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jun 05 17:24:20 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 1lpY9q-00091L-Bc for guile-user@m.gmane-mx.org; Sat, 05 Jun 2021 17:24:19 +0200 Original-Received: from localhost ([::1]:48428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpY9p-0001iJ-DU for guile-user@m.gmane-mx.org; Sat, 05 Jun 2021 11:24:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpY9e-0001i9-2O for guile-user@gnu.org; Sat, 05 Jun 2021 11:24:06 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:38655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpY9c-0002Bz-87 for guile-user@gnu.org; Sat, 05 Jun 2021 11:24:05 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D047CDC1; Sat, 5 Jun 2021 11:24:00 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Sat, 05 Jun 2021 11:24:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm3; bh=BbJ9X d9ElvWd6aZvmFMe+pV4RfDHhxlrwlbruKUA388=; b=TRsife9Kp1Wo2ZlA6Ltm4 tUh9y+4YofJNRFAg5LiNltkFC+cOvJcBcSQsL0Nm2VI1iNOi7dTmT05+OnTVBJ31 Jg/ZVow16vL5IvnoaIiXwZhICV+BPuTeFG/5dmJBi/82F6iehiGV2BNZlHs/9F79 w8oWXGFn8wAKoRJ0oL/rD3VqZn7KWA98DGUuQHDEWNIlxdOMdV+mbj+cdagdzaSK f0AbUuXQU8s6DavGvIt8vE6KQnXSLC42gJSusq7t5oM0zXPsKXKD/Dv5Ct0Rd7Me NfPpcs4WSSEHhTh/wUUBtPbaP0bfMRgNYD4FXxcmhy/EwBgHxoqHU5YLdzXHvNNK A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=BbJ9Xd9ElvWd6aZvmFMe+pV4RfDHhxlrwlbruKUA3 88=; b=SLR+8qGHAQqMF6FvaU1s0LrqJclPVr7o4NsAQ+NSdLyWoysQd4lT8i+bl QjP6MRlBoFREEl5VYYlcBRXmKt/9N0mld1o1dHXJNqdl8Hxh35+aYXOEwXYpZmWo D1etgm0+FIVW2dau2WQ1U4B2PQwo724EXVNPf5pFurkOjqRSLZtn0juqxn3BMONg bSWcCvYJLOtmubH1ybVqKZKu4tcC4hBcRfdrBcxbko4hSb187xZGAAXqm9a46doV FOjKH0YEiNCB28UdIGm88hOlPg2oXpvnjJWdiNvCJlaDQ+gPV5mmQAsXhL8GpRSy Lt2+G4wzLDY/U+luTSg1t1FY3T5YQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtfedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnihhn uhhspgeujhpnrhhnshhtrghmuceolhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrg hilhdrshgvqeenucggtffrrghtthgvrhhnpeefvdejteeghfefgfegteeggfeileegffeg gfejueegvedtfeelgfefveektdfhieenucffohhmrghinhepshhrrdhhthdprhgvugguih htrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mheplhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrghilhdrshgv X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 22585AC0062; Sat, 5 Jun 2021 11:24:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=64.147.123.19; envelope-from=linus.internet@fastmail.se; helo=wout3-smtp.messagingengine.com 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:17577 Archived-At: I implemented this hack before guile 3 got defines in function bodies: h= ttps://hg.sr.ht/~bjoli/guile-define Even I guile 3 it allows a more liberal placement of define, but it won'= t work for things like bodies of imported macros (like match) --=20 Linus Bj=C3=B6rnstam On Sat, 5 Jun 2021, at 00:27, Damien Mattei wrote: > hello, > i'm was considering that i want to be able to define a variable=20 > anywhere in > code, the way Python do. Few scheme can do that (Bigloo i know) > ( the list here is not exact: > https://www.reddit.com/r/scheme/comments/b73fdz/placement_of_define_in= side_lambda_bodies_in/ > ) > is it possible in guile to do it? i do not know, so could it be added= =20 > to > the language specification for future release? >=20 > regards, > Damien >=20