[REBOL] Re: [context] Problem with context?
From: apwing::zonnet::nl at: 4-Apr-2005 17:00
Anton Rolls wrote:
>If you had other functions in the object
>which also used the rule, then it would
>make sense to share the rule in the way
> parse input bind rule 'res
>which binds to the function's context (using
>the local word 'res as the known-word).
>If there's only ever going to be one function,
>then you might as well make all your rules
>be defined in the function body as locals, then
>you can probably dispense with the enclosing
>The fact that you did put the function in an
>object to start with makes me think you did want
>to share some parts like the rule...
>>obviously I had a wrong view on these things.
>>To better understand it I now moved RULE from outside to inside the
>>function and then it works properly, because the words are bound to the
>>Your suggestion to put all these variables right in the object (outside
>>the function) is also OK.
>>Thanks for helping me understand that great miracle called REBOL a bit
in fact I started putting it all in an object because I saw an example
In the mean time I tried a few variants (e.g. the one you mention
without a surrounding object).
Your points are clear. Of course you are right ;-)