Raymond Toy <toy@rtp.ericsson.se> writes:
> Wolfgang> (C1) array(xxx,float,2,3);
> Wolfgang> (D1) xxx
> Wolfgang> (C3) :lisp(symbol-plist '|$xxx|)
> Wolfgang> (ARRAY-MODE $FLOAT MPROPS (NIL ARRAY $xxx) ARRAY
> Wolfgang> #2A((0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0) (0.0 0.0 0.0 0.0)))
>
> (C2) array(zzz,2,3);
>
> (D2) zzz
> (C3) :lisp(symbol-plist '|$zzz|)
>
> (MPROPS (NIL ARRAY G1148))
>
> This seems a little unexpected. Since Lisp has arrays with
> element-type T, I would have expected some more like what your xxx
> array looks like.
> What do you think? This this be changed to match xxx? I don't know
> what impact such a change will have though.
Neither do I. But I guess that this is not meant to be understood in
terms of the CL type system. Perhaps, the idea was something like
;; let's see if SOME-ARRAY has got a type
(if (get some-array 'array-mode) ... )
So I wouldn't change it.
But I think that the weirdest thing here is the indirection (sort of)
(NIL ARRAY $xxx) (to itself) resp. (NIL ARRAY G1148) to a gensym which
has the array definition on its property list
(C2) :lisp(symbol-plist (mget '|$zzz| 'array))
(ARRAY
#2A((##### ##### ##### #####)
(##### ##### ##### #####)
(##### ##### ##### #####)))
In the second case, I imagine, this helps to distinguish an (old
style) lisp array (type (1) in the classification in marray.lisp) from
a Macsyma array (type (1m)), but in the first case?? Maybe, it's just
some kind of backward compatibility kludge (i.e., somebody noticed
that indirection was not really needed (anymore) and so he faked one
in order to keep old code working).
Wolfgang
--
wjenkner@inode.at