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: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to