symbolic subscript of literal list or matrix



I think that returning a[k] is a bad idea unless you can somehow be assured that the "a" in a[k] has a scope that is the same at all times subsequent to its construction.  And even then it would be impossible to explain to someone. 

----- Original Message -----
From: Robert Dodier <robert.dodier at gmail.com>
Date: Monday, July 23, 2007 10:15 pm
Subject: Re: [Maxima] symbolic subscript of literal list or matrix

> On 7/21/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> 
> > > At present Maxima complains if the subscript of a literal list 
> or matrix
> > > is not an integer. E.g. a : [1, 2, 3]; a[k] => error.
> > >
> > > I would like to change it so that a subscript expression is 
> returned.> > E.g. a : [1, 2, 3]; a[k] => a[k]
> >
> > Why not [1,2,3][k]?  I assume we are talking about evaluation 
> here, not just
> > simplification (in which case the value of a would be irrelevant).
> 
> [1, 2, 3][k] is clumsy, that's all. I realize it is somewhat of a
> wart from a technical perspective, but I think the practical
> utility of a[k] outweighs that. Certainly a[k] is less ugly, and
> more useful, than printing an error message.
> 
> FWIW
> Robert
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>