Correcting myself, the functions in objects are really different, if you
want to have only one copy of any function, you must write it outside of the
object.

Ladislav

You wrote:

 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?

....
(rest snipped)

Reply via email to