[EMAIL PROTECTED] wrote:

[...]
> Something like:
> 
> !: func [
>     object [object!]
>     'method [word!]
>     /local mth
> ] [
>     ; let's skip error checking for clarity
>     mth: get in object/methods method
>     bind second :mth in object 'self
>     return :mth
> ]

Yes.

> - a nice idea. The problem here is that this approach is static, i.e.
> non-re-entrant, because it uses only static storage for object parameter,
> namely the code block of method, so your code wouldn't work for something
> like this too:
[...]

You're right; in those cases you need to pass the object as an
argument to the method. Perhaps working on a copy of the method
could avoid that, but the subject is "Preventing code
duplication"...

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

Reply via email to