Skip to content

The Enclose of an Empty Array

Vector 14:1, page 8

language design

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 8

ISO APL and the proposed standard for Extended APL define an empty array A as an array, the count of which is 0, the count being the product of the shape list of the array (×/⍴A). APL books and manuals translate this by defining an empty array as an array of rank 1 or more with at least one length of its axes being 0.

So, empty scalars do not exist. The basic idea seems to be that, as a scalar has no dimensions, it cannot be empty. But what about the enclose of an empty array, for instance the enclose of the empty numeric vector (⊂⍳0) or the enclose of the empty character vector (⊂'')? It’s a scalar: its rank is 0. On the other hand, it has no value. Should we call such a scalar a ‘pseudo empty scalar’ or a ‘non-valued scalar’?

Joseph De Kerf