Agreed that the current list vs hasharray scheme stinks.
But rather than have separare notations, I think I'd prefer to *unify*
the concepts: they are just different concrete manifestations of maps
x -> y, where lists have x in 1..n. Maps in general should be
first-class values, not a special properties of symbols (as hasharrays
are). They would print uniformly. There would be a standard input
syntax for maps. Etc.
Of course, the details need to be worked out (and there are many).
-s
On 12/16/09, Jaime Villate <villate at fe.up.pt> wrote:
> On Tue, 2009-12-15 at 18:43 -0600, Barton Willis wrote:
>> (%i1) ssol[1] : 42$
>>
>> (%i2) ssol : linsolve([C1*3-2,C2*1+4],[C1,C2]);
>> (%o2) [C1=2/3,C2=-4]
>>
>> ssol[1] --> 42, not C1=2/3
>>
>> (%i3) ssol[1];
>> (%o3) 42
>>
>> But inpart(ssol,1) is OK
>>
>> (%i4) inpart(ssol,1);
>
> Another way to access the list ssol, instead of the hashed array ssol,
> which I find more intuitive is:
>
> (%i5) first(ssol);
> (%o5) C1 = 2/3
> (%i6) second(ssol);
> (%o6) C2 = -4
>
> I think that using the same notation a[i] for lists and hashed arrays is
> very confusing and we should change it.
> Regards,
> Jaime
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
--
Sent from my mobile device