[REBOL] Non-reentrant function calling in Rebol Re:(4)

1999-12-09 Thread icimjs

At 11:53 AM 12/9/99 +0100, you wrote:
>[EMAIL PROTECTED] wrote:
>
>> However, shouldn't 'f have been indefinitely extended, when f was returned
>> as part of the function returned by samef?
>
>The problem here is that the context 'f references is static.

That is understood. I'm talking about how long that staticly contexted 'f
will remain accessible. My expectation is that as long as some live
reference to 'f continues to haunt REBOL, 'f should stay alive as well. Of
course, the value 'f references will be determined by the value last passed
to the function, in whose context the argument 'f is defined.

Opinions?

Elan

>
>Ciao,
>/Gabriele./
>o) .-^-. (--o
>| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
>| GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
>o) `-v-' (--o
>
>
>



[REBOL] Non-reentrant function calling in Rebol Re:(4)

1999-12-03 Thread lmecir

Hi Ladislav,

I have to run now. Just wanted to mention that I believe you choose a
somewhat strong language,

>---
>I am sorry, but your approach is worth nothing,
>it's too trivial.
>---

when the triviality you complain about is due to the function you had
supplied, namely

samef

You had a problem with samef. I pointed out what the problem is
L>
actually, you didn't find anything wrong on my approach,
just found another approach, which gives a correct result, but is
unacceptable except for trivial cases. I do know even simpler way how to
change it:

samef: func [f] [:f]

But that doesn't mean I am happy I solved it. The problem here is, that
these trivial solutions are useless sometimes. This trivial problem I chose
only because I was sure everyone can understand it's triviality and the
fact, that legitimate approach fails...
/L>

and showed
you how to implement it correctly. Don't complain about the simplicity of
the function you had chosen to begin with. It wasn't my choice.

I wonder what John C. thinks about this problem, since he appeared quite
interested in functional programming and function reentrancy should be a
major concern to him, don't you think, Ladislav?

I'd be curious to see him join this thread. I'd expect to see an
interesting discussion between you two guys.

I'll comment a little more on your ideas later.

Take Care,

Elan