[EMAIL PROTECTED] wrote:
> I don't know what you mean by locking a script.

I don't use that feature either, but the obvious
google search (site:jsoftware.com locked script)
finds me
http://www.jsoftware.com/books/help/user/locked_scripts.htm

> If that information is unavailable (presumed effect of
> 'script locking'), a more foolproof way to extend an object
> would be to keep/manage a local copy inside your new class
> instead of inheriting from  it. (I can't tell if your
> workaround lets you do everything you need).

Bill is extending the parent class in the child definition,
so that the parent's create has an alias.

To see this:
   coclass 'one'
   foo=: +/
   coclass 'two'
   coextend 'one'
   bar_one_=: foo_one_

   coinsert 'one'
   bar
foo_one_

An advantage here is that resolution of this name
is deferred until run time.

However, personally:

I don't see any advantage of the name pbx_create over 
create_pbx_ when they both refer to the same thing, 
and create_pbx_ is simpler to understand.

Also, rant time:

Also, I wish I had never ever suggested coextend's
features be a part of the standard J facilities 
(that it be used for class inheritance instead of 
coinsert).

The "value" of coextend is that it separates compile
time name resolution (for the class) from run time
name resolution (for the object).  In very large systems
with many programmers working independently and
comunicating poorly this can be a valid technique to
keep them from stepping on each other's toes.

But, this very issue is in sharp contrast to the 
architecture of J, which focuses on helping a 
programmer understand and work with the problem 
domain.

One of these days, someone is going to figure out 
how to reliably deploy versions of these names 
which rely solely on the 18!: facilities and 
entirely discard the COXXX variables.

That, I think, was the original J design.

Anyone really needing the current implementation
can (and should) include a script giving 
coextend_z_ (and so on) their current, overly fussy 
definitions.

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

Reply via email to