3 ms·
Mostly yes. Numbers (and character) are implemented as arrays with 0 dimensions. Text would be an array of characters with 1 dimension (the number of character
by rklmno 5y ago
Mostly yes.
Numbers (and character) are implemented as arrays with 0 dimensions. Text would be an array of characters with 1 dimension (the number of characters), and generally speaking the dimension of an array is a one dimensional list of non-negative integers. Many array languages also include an array type which is approximately the same as a C pointer to an array, with a bit of jargon thrown in to distinguish a reference to an array from the array itself.
Something like an SQL table in an array language would be implemented as a list of columns (rather than as a list of rows) and a corresponding list of column labels. This has some interesting benefits.
That said, functions in array language are typically not arrays (though they presumably would have a textual representation). So... not everything is an array.
- rscho 5y agoFrom the J docs: https://www.jsoftware.com/help/dictionary/dx005.htm https://www.jsoftware.com/help/dictionary/dx005.htm nub=: (i.@# = i.~) # ] 5!:2 <'nub' +-------------------+-+-+ |+--------+-+------+|#|]| ||+--+-+-+|=|+--+-+|| | | |||i.|@|#|| ||i.|~||| | | ||+--+-+-+| |+--+-+|| | | |+--------+-+------+| | | +-------------------+-+-+ ... so J functions have an array representation, at least.
- rklmno 5y agoYes, each J function has several array representations.