Perhaps "Principles of APL 2" by Dr. James A. Brown (the "inventor"[*] of APL 2) will shed some light on the behaviors you're seeing.
http://www.softwarepreservation.org/projects/apl/Papers/PRINCIPLESOFAPL2/view The entire document is worth reading, as it explains how and why APL 2 differs from APL. Chapters 11 through 15 are particularly apropos to our current discussion regarding enclosures and empty arrays. Point is: APL 2's rules may be counterintuitive to those of us coming to APL 2 from APL. (I know I've struggled mightily with the learning APL 2, despite having been a rather accomplished APL programmer.) Counterintuitiveness, though, does not equate to arbitrariness. [*] Dr. Brown built upon the work of Dr. Trenchard More. Unfortunately, most of Dr. More's papers are behind paywalls. A look at the abstracts of his papers, though, ought to dispel the notion of arbitrariness w.r.t. the underlying theory of nested arrays. http://en.wikipedia.org/wiki/Trenchard_More http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=5391380&url=http% 3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F5288520%2F5391374%2F05391380.pdf% 3Farnumber%3D5391380 There are others exploring nested arrays. This dissertation, for example, includes a survey of some of the research in the field: ftp://ftp.cs.joensuu.fi/pub/Dissertations/eriksson.pdf On Mon, 2014-05-12 at 11:04 -0500, Blake McBride wrote: > One can make up a set of, perhaps arbitrary, rules, and apply them > consistently only to end up with something unintelligible and > difficult to use. Enclose "turns into a scalar" rather than enclose > "adds a level of boxing" is the perfect example. > > > I programmed in APL for five years. Not having access to APL2, I > wrote my own equivalent of boxing and unboxing functions in plain APL > that were very, very useful. I'm sure my functions were slow. I was > looking forward to native and fast support for the same capabilities. > If I can find APL2 idioms to do the same thing (simple and uniform > boxing and unboxing) as I asked in my previous email to Jürgen, I > would be happy indeed.
