# Talk:Array model

Jump to navigation Jump to search

"elements can only be arrays, characters and numbers are held to be contained in simple scalars, arrays which by convention contain themselves as elements. In each case arrays may be considered to be homogeneous because all of their elements have the same type."

We first defined elements as the arrays within 0-cells of an array. (depth + ¯1 sub-arrays) and then continue to use elements to refer to the 0-cells. Is there not a clearer way to distinguish between them? It appears as though we need to define 0-cells as a fundamental idea.

As far as I can tell the definition of "thing inside a 0-cell" is used consistently, that is, I don't see anywhere on this page where "element" has to refer to a 0-cell. I think the idea of a 0-cell isn't needed precisely because it isn't fundamental, but there's probably some difference of interpretation here. --Marshall (talk) 01:18, 3 September 2022 (UTC)
The inconsistency I see is in "arrays may be considered to be homogeneous because all of their elements have the same type", here elements must refer to 0-cells, as this statement cannot apply, for example, to the array 'abc' (1 2 3). The elements ("things inside a 0-cell") are not of the same type. --Faun (talk) 19:49, 3 September 2022 (UTC)
The next sentence explains this to mean that both elements have the type "array". The property that differs is the so-called "element type", which is more of an implementation thing than part of the language. I don't know if there actually is a formal meaning of "type" in the nested world (Type isn't it), so this is an informal usage. And I also don't think it's really a crucial point to make, so if it's unclear then it could be removed. --Marshall (talk) 20:46, 3 September 2022 (UTC)
I see, in that case. The "homogenous" point is opaque to me. Explained through the lens of 0-cells made sense, but that clearly wasn't the intention. The last paragraph of the "Nested array theory" section explains a similar point effectively. --Faun (talk) 20:58, 3 September 2022 (UTC)