On Sun, Sep 1, 2013 at 12:08 AM, Pascal Jasmin <[email protected]> wrote:
>   'field' of < '2'  NB. Object instances are boxed string of a number afaik 
> (why string?)
> field_2_

This increases the chance of detecting mis-use of an instance
reference: they are not valid indices into an array (remember that J
supports using boxed numbers to select from arrays).

> Is all of this a bad idea?  Worth avoiding objects whenever possible 
> including the "hack" at the top of this post that creates and destroys top 
> level verbs?
> Are there other approaches that make managing lists of objects easy/possible?

Conceptually speaking, the justification for including objects and
classes in J was to allow independent programmers to build subsystems
which can be used together or which can be consumed by other coders.
Other uses can be academically interesting, and useful for exploring
ideas, but arrays are a lower-level concept than objects.

In other words, for efficient machine use you should probably put
arrays inside objects instead of the other way around.

However, if efficiency is not an issue for you, there's no problem
with having arrays of objects in production code.

Is this point of view relevant to you?

Thanks,

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

Reply via email to