Yes, this is true.  It is an artifact of the very pure binding model
used by REBOL.  (What I call definitional binding, similar to, but not
quite the same as, static binding.)

We will eventually add a METHOD datatype to allow reuse of code in
multiple contexts (objects). But, that requires a dynamic
binding mechanism within the interpreter.

Perhaps in a couple more revisions....  Our focus is on adding a
number of other useful features right now.

-Carl, REBOL Creator


> I am considering writing an app that would create several hundred or
>a few thousand copies of a single object. One way to keep track of them
>is to use an array. A script that tests this syntax is below along with
>a run which does a "print mold" on the array. It appears that the
>functions(methods) in the object are replicated for each instance
>of the object in the array. Is this true? Is this efficient? I am more
>used to OO languages like C++ where only the data fields would
>be replicated and there would be only one copy of the functions
>for all the instances of the class. Is there a better way to do this? 

Reply via email to