Here is my proposed semantics: currently an array is a function N_n0 * N_n1 * N_n2 ... -> A. A is some atomic type; n0 n1 n2 ... are the shape of the array; N_n denotes the set of non-negative numbers less than n.

Adding dictionaries means extending the potential domain of an array to include sets of symbols. I think this is the most coherent and general extension.

An alternative would be to say that a dictionary is a completely separate data type from an array. In that case, it should probably also be exclusively one-dimensional. This simplifies a number of things, but is also somewhat less consistent.

I will try to construct a model of this sometime this week, or the weekend at the latest.

 -E

(Hauke: yes, you are right, I meant rectangular, not homogenous.)

On Tue, 1 Feb 2022, Hauke Rehr wrote:

I’d rather have the shape with respect to the topmost other kind.
First axis numeric:
the numeric shape below which the first symbolic one occurs
first axis symbolic:
vice versa

you may need to check the return value of the adjusted implementation
of the datatype primitive for those “other kind” atoms

Alternatively, have shape be the list of boxes of such shapes all the
way down.

The first idea would allow for non-rectangular
(@Elijah: afaik this is ⊥ to homogenous; homogenous: same data type)
structures as those symbolic substructures are considered “atoms”
no matter their respective shapes

otoh, maybe it’s better to actually keep things strictly rectangular
since that’s the way J and its primitives work (as of now)

I hope this is not written too confusingly.


Am 31.01.22 um 22:31 schrieb Elijah Stone:
On Mon, 31 Jan 2022, Elijah Stone wrote:

I think it makes most sense to make symbolic axes positive, same as normal axes.

Non-negative, of course!


A question is what the shape of a partly symbolic array should be.

(Or completely symbolic; I just meant not completely numeric.)

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

--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
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