On Feb 24, 1:32=A0pm, Jimmy Miller <CaptainThun...@[EMAIL PROTECTED]
> wrote:
> On Feb 24, 11:05 am, Gosi <gos...@[EMAIL PROTECTED]
> wrote:
>
> > Arrays And References
> > Jean-Jacques Glrardot
> > Ecole des Mines
> > 158 Cows Fauriel
> > 42023 Saint-Etienne C6dex, France
> > gira...@[EMAIL PROTECTED]
fr
> > Abstract
> > ...
>
> Interesting paper. =A0I didn't read the whole thing, although I would
> like to outline my idea on how generalized arrays should work:
>
> Essentially, any expressions that are juxtaposed and not separated by
> a function or operator will be part of the same array. =A0This allows
> not only for multi-type arrays, but also jagged ones. =A0Consider the
> following theoretical session:
>
> =A0 =A0 =A0 12 'abc' (1 2)
> 12 'abc' (1 2)
> =A0 =A0 =A0 12 'abc' (1 2) [3]
> 1 2
>
> The interpreter would evaluate (1 2) to get the array 1 2, 'abc' to
> get a string, and 12 to get an integer. =A0It would then catenate these
> three value into one array.
>
> The inner array would essentially be considered a scalar while inside
> the outer array. =A0Ideally, the nested arrays should work seamlessly
> with all primitives:
>
> =A0 =A0 =A0 3 1 {rho} (1 2 3)
> (1 2 3)
> (1 2 3)
> (1 2 3)
> =A0 =A0 =A0 1 (4 5) + 1 2
> 2 (6 7)
>
> This system may have some unforeseen flaws, but I think it's the
> simplest way to introduce irregular data structures. =A0Multi-type
> arrays could give programs a similar expressive boost.
Your suggested handling of juxtaposed array expressions is exactly the
strand notation proposed by Trenchard More for array theory. It is
used in Nial as part of its juxtapositional syntax (see www.nial.com).
Nial uses the floating version of nested arrays and has pervasive
scalar (called atomic in Nial) operations.
My talk at APL 2007 in Montreal discussed some of the lessons learned
in the design of Nial.
the Q'Nial interpreter is freely available from the above Nial Systems
Limited site.
In my experience in studying and using nested arrays since the early
1970s, the floating system is a superior mathematical system because
of the identities it sup****ts. Using Nial notation, the theory has a
fundamental equation
shape A reshape (first A hitch rest A) =3D A
which marries APL and Lisp concepts.
If one defines the enclosing operation by
single A =3D Null reshape (A hitch Null)
then the fundamental equation implies that
single A =3D A
However, it is clear from the success of APL variants and J that
either a grounded or floating system can be used to
program practical problems in an effective way.
My work in the paper
Array Theory and Nial - available from the website
shows that an array theory that satisfies all the desirable identities
is not possible.
Choices have to be made on pragmatic criteria that make programming
effective.
There is no easy answer for the dilemma facing the APL Standards
committee.
I wish them success in finding a solution that meets the needs of the
APL community.
Mike Jenkins


|