<div dir="ltr"><div dir="ltr"><div dir="ltr">On Wed, 11 Mar 2020 at 19:39, Jörg F. Wittenberger <<a href="mailto:Joerg.Wittenberger@softeyes.net">Joerg.Wittenberger@softeyes.net</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">On Tue, 10 Mar 2020 21:19:01 -0400<br>
Marc Feeley <<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>> wrote:<br>
<br>
> > On Mar 10, 2020, at 6:41 PM, Jörg F. Wittenberger<br>
> > <<a href="mailto:Joerg.Wittenberger@softeyes.net" target="_blank">Joerg.Wittenberger@softeyes.net</a>> wrote:<br>
> > <br>
> > ;; YMMV, but I find this not exactly intuitive.  <br>
> <br>
> On the contrary I find it very intuitive!> I give an example of why<br>
> this semantics is what you want in the paper “A Better API for<br>
> First-Class Continuations” section 1.3<br>
> (<a href="https://www.researchgate.net/publication/2405339_A_Better_API_for_First-Class_Continuations" target="_blank" rel="noreferrer">https://www.researchgate.net/publication/2405339_A_Better_API_for_First-Class_Continuations</a>).<br>
<br>
Note. I'm not saying that it would be wrong by any means.<br></blockquote><div><br></div><div>[...]</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
In practice I'm much easier confused understanding code with dynamic<br>
scope applies than code where lexical scope rules.<br></blockquote><div> </div><div>As for me I find the parameter objects highly intuitive.</div><div><br></div><div><br></div><div>Detail discussion:</div><div><br></div><div>With that said, if you need to solve a primary language problem than parameter objects were designer for, e.g. normal function value arguments, then of course parameters are not needed.</div><div><br></div><div>The teleport example I included in my third post in this thread, reflects what I use parameter objects for. Again:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div></div><div>(define (a)</div><div>  ; Teleport from hr</div><div>  (b))</div><div>(define (b) (c))</div><div>(define (c)</div><div>  ; Teleport to hr</div><div>  #!void)</div></div></div></div></blockquote><div></div><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br></div><div>This is the same usecase as Marc uses them for in the runtime. That is, you have a chain of procedure calls where including a hundred arguments would be too verbose (or calls go through "someone else's code" where you can't even add arguments), and for this reason you use parameter objects, which you assign at the beginning of the call chain (by |parameterize|) and then use at the end of the call chain (by calling the respective parameter object), and the utility is that none of the intermediary procedures need to define those values as arguments (e.g. in the example above, the |b| procedure does not need to define as arguments the values teleported from |a| to |c|).</div><div><br></div><div>The |doit!| example you provided does not illustrate this particular utility, but some other utility. On a quick read cannot immediately comprehend what your |magic| procedure does so can't comment on it. I do see call/cc calls inside |magic|'s definition however and I agree that the combination of parameter objects and call/cc would need additional consideration (unclear of details in this moment). call/c is not so frequently used though and its use does mean that particular considerations need to be made for all associated code anyhow though so I don't find it to steal from the teleport utility per above. If you need parameter objects that work some other way than the ordinary Gambit/Scheme parameter objects, just by all means implement that functionality yourself.</div><div><br></div><div>Adam</div></div></div></div>