Hi Ladislav,
you wrote:
>The problem is, that if you use the static storage for an argument,
>you are making another source of ugly bugs - the method calls are
>non-reentrant, which makes more problems than it solves.
>
>If you would try to take a reentrant approach (which I consider a must), you
>should create a curried function, but i don't remember the Jeff's solution.
>Maybe I can find it somewhere, or find my own approach.
I think that:
do ! object function static-storage-arg
is equivalent to
do :function static-storage-arg
is equivalent to
function static-storage-arg
Ok, they are not equivalent since the second two do not have to be bound to
the embedded object's context, whereas do ! object ... is. But that is also
true for your version of !. If being bound to the embedded object's context
had any impact on using a static storage argument, it should effect your
version of ! as much as mine.
Therefore I don't think it's a problem. But perhaps I'm not interpreting
you correctly. Based on the above list of equivalences I conclude that a
(recursive) function will work properly, provided it works properly when it
is evaluated outside of the object and ! exclamation mark context.
I wonder whether you can come up with an example where using my definition
for ! will fail, whereas your original definition of ! will succeed?
What do you think?