> (create_pbc_ f.) y

Doesn't feel right anyway: creates a copy
each times it is executed.

Here is a different pattern for overriding
"virtual" methods:


NB. =========================================================
coclass 'one'

create_one=: 3 : 0
  A=: 123
  B=: 789
)
create=: create_one

NB. =========================================================
coclass 'two'
coinsert 'one'

create_two=: 3 : 0
  create_one y
  A=: 456
  C=: 345
)
create=: create_two

NB. =========================================================
0 : 0 NB. Ctrl+W, Ctrl+E
names_one_''
names_two_''
a1=. ''conew'one'
A__a1,B__a1
names__a1''

a2=. ''conew'two'
A__a2,B__a2,C__a2
names__a2''

names_one_''
coerase a1,a2,;:'one two'
)


--- bill lam <[EMAIL PROTECTED]> wrote:

> Gilles Kirouac wrote:
> > Is there any constraint in the use of 3!:6?
> >
> AFAIK none except definition of names is not available. eg.  verb f. will give
> the verb's name rather than its definition. This is the feature that makes
> locked script useful. If your app depends on verb f. , eg.
> (create_pbc_ f.) y
> as in the oop lab, then it will fail.
> 
> -- 
> regards,
> bill



 
____________________________________________________________________________________
Want to start your own business? Learn how on Yahoo! Small Business 
(http://smallbusiness.yahoo.com) 

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

Reply via email to