unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Damien Mattei <damien.mattei@gmail.com>,
	guile-user <guile-user@gnu.org>,
	 guile-devel <guile-devel@gnu.org>
Subject: Re: expression and definition context in Scheme
Date: Sat, 27 Aug 2022 21:20:26 +0200	[thread overview]
Message-ID: <ec081c23-17e7-403f-79c4-5aabd82eb237@telenet.be> (raw)
In-Reply-To: <CADEOadeSNAL6sk_cxGUkWq_d-h0ubnvSTri7j9prexMRk-9W-w@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1396 bytes --]


On 27-08-2022 21:02, Damien Mattei wrote:
> in fact just allow 'define that act locally ,see my comment below

I do not know what semantics you want.

>     Also, even if (begin ...) and (let () ...) where unified, it would
>     be a shame to lose the ability to only have some definitions
>     temporarily:
>
>     (define foo 0)
>
>     (let ((foo 0))
>       whatever-something-using-the-inner-foo)
>
>     something-using-the-outer-foo-again
>
> i do not propose foo to overwrite the global one

In that example, (define foo) might be global, but it might as well have 
been

(let ((foo 0))
   (let ((foo 0))
     whatever-something-user-the-inner-foo)
   something-using-the-outer-foo-again)

or

(let ()
   (define foo 0)
   (let ((foo 0))
     whatever-something-user-the-inner-foo)
   something-using-the-outer-foo-again)

I did not assume anything about global/local and wrote nothing about 
overwriting.
> , just to allow local define that have a local (in the block) range.

If with 'block' you mean the local (let ...) form, then this is already 
the case.

If not, maybe you are asking for Python-like lexical variables, but you 
have asked about that in the past -- it's a valid choice, but not Scheme.

If something else, you need to be much less vague and much more precise 
on what you want.

Greetings,
Maxime.


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  parent reply	other threads:[~2022-08-27 19:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 16:48 expression and definition context in Scheme Damien Mattei
2022-08-27 17:00 ` Maxime Devos
2022-08-27 19:02   ` Damien Mattei
2022-08-27 19:14     ` Maxime Devos
2022-08-27 19:20     ` Maxime Devos [this message]
     [not found]       ` <CADEOadfCCLaqEvzLYUzEYhg94pqN3r9=c6LT=FmCivJsPudUzg@mail.gmail.com>
     [not found]         ` <b95df274-b727-5bb9-4657-f263a837e0f1@telenet.be>
     [not found]           ` <CADEOadfKR_u3qS5N5MwRuCRTxPjKi_wyWzgv-xJJ96e56X2meg@mail.gmail.com>
2022-08-29 10:10             ` Fwd: " Damien Mattei
2022-08-30 10:47 ` Linus Björnstam
2022-08-31  7:01   ` Damien Mattei
2022-08-31 15:29     ` Maxime Devos
2022-09-01 20:21       ` Damien Mattei
2022-09-04  8:08         ` Damien Mattei
2022-09-07 23:12   ` Aleix Conchillo Flaqué

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec081c23-17e7-403f-79c4-5aabd82eb237@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=damien.mattei@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).