Re: new function

2021-09-23 Thread Damien Mattei
interesting discussion about "scope", note i'm not saying i want Scheme+ act as Python, i'm still thinking the best solution... to be sure about terminology i find this good article about scoping: https://medium.com/altcampus/scope-local-global-and-lexical-e164f53450b3 Damien On Wed, Sep 22, 2021

Re: new function

2021-09-23 Thread Damien Mattei
yes i know parsing the whole code is the only portable solution, but it is slow,even on a few dozen of lines the slowing is visible ,so i can even think of that on one thousand lines... I finally succeed in Guile with simple piece of code to make my example run with a single assignment operator <-

Re: new function

2021-09-23 Thread Maxime Devos
Damien Mattei schreef op do 23-09-2021 om 19:27 [+0200]: > yes i know parsing the whole code is the only portable solution, but it is > slow,even on a few dozen of lines the slowing is visible ,so i can even think > of that on one thousand lines... > > I finally succeed in Guile with simple piec

Re: new function

2021-09-23 Thread Taylan Kammer
On 22.09.2021 23:52, William ML Leslie wrote: > On Thu, 23 Sep 2021, 4:51 am Taylan Kammer, > wrote: > > On 22.09.2021 11:53, Damien Mattei wrote: > > i already do it this way for internal defines ,using a recursive macro > that build a list of variable us

Re: new function

2021-09-23 Thread Taylan Kammer
On 23.09.2021 19:27, Damien Mattei wrote: > yes i know parsing the whole code is the only portable solution, but it is > slow,even on a few dozen of lines the slowing is visible ,so i can even think > of that on one thousand lines... > > I finally succeed in Guile with simple piece of code to ma

Re: new function

2021-09-23 Thread Damien Mattei
yes it can reuse an upper and precedent definition but a nested definition can not be used later at an upper level. anyway it would not be portable , for all those reason i will use to separate operator ,basically <- for set! and <+ for define ,so i can even modify toplevel bindings , i did not wa

Re: new function

2021-09-23 Thread Taylan Kammer
Responding to myself: On 23.09.2021 22:27, Taylan Kammer wrote: > I can't seem to find syntax-local-binding in Guile 2.2 or 3.0. Did you > have to import some special module, or are you using another version? Worked when I imported (system syntax internal). > Either way, I suspect that the fol

Re: new function

2021-09-23 Thread Damien Mattei
yes i'm using GNU Guile 3.0.7, https://www.gnu.org/software/guile/docs/master/guile.html/Syntax-Transformer-Helpers.html i have tested a lot , even define-once again and i choose to use to assignment operators and portable code because the non-portable function do not bring more, finally it was no

Re: new function

2021-09-23 Thread Damien Mattei
so i drop off the idea of a single assignment operator, there will be 2 ,<- for single assignment when the variable has been previously defined (at upper level), and another <+ that add a variable in the environment using define. Other possibility is to have a single assignment operator <- and to d