I wrote:

Implementation: make object! [
        t: "Now is the hour..."
        Test_Implementation: func [] [
                t
                ]
        ]

Interface: make object! [
        Test: get in Implementation 'Test_Implementation
        ]

Elan wrote:
> That's very cool. At the same time I would expect it to work. Which
part surprises you? That you can access the function referenced by
Implementation/Test_Implementation using "get in ..." or is it that you
can assign the retrieved function to Test as part of creating your
Interface object? Or both? ... Neither?

That Interface/Test returns the value of 't! In C++, this wouldn't
work, as the function 'Test_Implementation wouldn't be able to find 't
in 'Interface. It's disturbing to me as a C++ programmer, but viewing
it as a novice might, it seems perfectly correct that the copied
function "knows" where t is.

Andrew Martin
[EMAIL PROTECTED]
http://members.xoom.com/AndrewMartin/
Online @ 33,600 Baud!
-><-

Reply via email to