again on arrays and lists



On 5/22/2010 6:20 AM, Mario Maio wrote:
> Consider the following lines: 'x' is defined as a list and then the 
> same symbol 'x' is used for an array:
>
In other words, you start by making an error, and then see what happens.

This is a relic of the (by today's standards) peculiar behavior of 
arrays in Maclisp, circa 1966, when Macsyma
was put together.

Perhaps array(...) should evaluate its first argument, in which case 
x::[1,2,3] followed by array(x,10)  would
give an error.   I think it would be unfortunate to burden every 
assiginment x:: ....  with a check to see if
x had been designated an array.  Another possibility would be to remove 
array(x,10) entirely in favor of
x:array(10). I don't know how many people use it, but it is almost 
always unnecessary to declare arrays except for "efficiency".

This still leaves the hashed array mechanism, though,

RJF