On Sat, Nov 29, 2008 at 11:32 PM, Raul Miller <[EMAIL PROTECTED]> wrote:
> ...
> Anyways, I think that this is doable.
>
> But I'm not sure if this is very useful.
> Why not just write the code explicitly?
> Who would use this?  What would
> they use it for?
>

I've been interested in closures within J as a means of resolving how
to handle multiple inheritance.  A few programming languages already
use this approach:

"Godiva's ... multiple inheritance semantics borrow from closure-based
inheritance (CBI), developed originally in the Idol programming
language. CBI defines a simple rule for name conflicts in multiple
inheritance. When inheriting from a list of superclasses, the compiler
adds fields and methods using a left to right, depth-first search of
the superclass list. The first superclass to define a field or method
has strict ownership of that identifier."

Perhaps the closure code you provided would serve as a first step
toward a module that would automate multiple inheritance in J using
that semantic model.

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

Reply via email to