bill lam wrote:
> Is it guarantee that at any point, {.copath 18!:5'' being the class 
> from which the object is conew-ed from? (assuming the object is 
> indeed conew-ed from something)

That seems to be guaranteed when create is being executed by conew.

> >>BTW is "cocurrent" now redundant in J601?
> > 
> > I find uses for it, but maybe for your purposes it is redundant.

> Eric said coextend=: coinsert is extra baggage. By the same token, 
> so is cocurrent=: coclass

I don't use coclass for oo programming.

I use:
class_z_=:3 :0
 coinsert y
 18!:4 coname''
)
new_z_=:3 :0
 o=. cocreate''
 ((,copath)coname'') copath o
 this__o=: o
 create__o y
 o
)
create_z_=: ]
destroy_z_=: codestroy bind ''

Usage example:
   class_example_''
   obj=: new_example_''
   destroy_obj_''

I've not nailed down all the reasons yet, but I find myself far
more comfortable with this notation than with coclass.

Nevertheless, this approach works with classes which were 
implemented using coclass.

-- 
Raul


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to