It shouldn't break code considering that original spec is for an unboxed y, and 
it would not make sense to trap the error of sending method a boxed name.  
Haven't tested your code.





On Thursday, July 16, 2020, 12:44:13 a.m. EDT, David Lambert 
<[email protected]> wrote: 





I need an object to create an instance of same class.
Solution, unbox and re-box
value conew 0 {:: coname''

Is this a common need?  Does putting boxopen into conew break code?  If
not, we could use
value conew coname''

conew=: 3 : 0
c=. boxopen y          NB. was  c=. <y
obj=. cocreate''
coinsert__obj c
COCREATOR__obj=: coname''
obj
:
w=. conew y
create__w x
w
)

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

Reply via email to