Hi all!

IBM, APL2 Programming: Language Reference http://publibfp.boulder.ibm.com/epubs/pdf/h2110611.pdf

You were right in that a scalar was considered an array.

There is a difference in that we used the AXIS notation instead of what is Rank? See page 55.

This means the functions did not normally act on k-cells, but along default or specified axis?

This is different from in J where functions act on k-cells?

So:

Is there any documentation of the design decision to select the n-cell array
model?

Are there any threads in the forum where this array model is discussed?

Maybe someone also wants to share their knowledge from internal discussions
about this design decision.

Cheers,

Erling Hellenäs


Den 2017-12-19 kl. 14:28, skrev Raul Miller:
I'm not completely sure what you are getting at here, actually.

When I was learning APL, I was taught that a scalar was a rank zero
array. And it seems to me that J uses the same design.

If you look at J's 3!:1 and 3!:2 foreigns (or you can use 3!:3 instead
of 3!:1 if you prefer), you'll see that J uses the same data structure
for arrays regardless of rank (There's size differences, of course, in
the dimension and the data). If you are working in a strongly typed
environment, you'll probably want to be using a dependent type system.

That said, APL2 did pull some shenanigans with rank zero arrays and
infinity. J follows the Sharp APL design instead of the APL2 design,
if that is what you were asking about.

I hope this helps,


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

Reply via email to