On 27-08-2022 18:48, Damien Mattei wrote:
I don't think it's cheating or abusive.My ideas is as it is so easy to cheat the compiler
from seeing the expressio context why does the compiler restrict this? expression and defintion context, i'm not sure they are in scheme standarts, are they really usefull?why not remove this from Scheme at all?
I haven't read the RnRS closely, but I doubt that
(some-procedure (define foo 0) (define bar 0))
is allowed by the standard and that it could be meaningful.
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
If 'let' was replaced by 'begin', then it would have different semantics.
Greetings,
Maxime.