expression and definition context in Scheme

2022-08-27 Thread Damien Mattei
Hello, i'm facing sometimes recursively the problem to have definitions in expression context, which i manage every time by adding an upper empty (let () my definitions goes here ) the last case i was facing this probleme is defining a 'for macro: ;; scheme@(guile-user)> (for ({i <+ 0} {i < 5} {i

Re: expression and definition context in Scheme

2022-08-27 Thread Maxime Devos
On 27-08-2022 18:48, Damien Mattei wrote: My ideas is as it is so easy to cheat the compiler I don't think it's cheating or abusive. 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 rea

Re: expression and definition context in Scheme

2022-08-27 Thread Damien Mattei
hello Maxime, On Sat, Aug 27, 2022 at 7:00 PM Maxime Devos wrote: > > On 27-08-2022 18:48, Damien Mattei wrote: > > My ideas is as it is so easy to cheat the compiler > > I don't think it's cheating or abusive. > > from seeing the expressio context why does the compiler restrict this? > expressi

Re: expression and definition context in Scheme

2022-08-27 Thread Maxime Devos
On 27-08-2022 21:02, Damien Mattei wrote: I haven't read the RnRS closely, but I doubt that (some-procedure (define foo 0) (define bar 0)) ? i do not understand well the meaning Me neither, that's what I meant. You are proposing to unify expression context and definition context

Re: expression and definition context in Scheme

2022-08-27 Thread Maxime Devos
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 tempo