proposal: subscripted local variables



Hi, Robert,

What's the motivation for allowing subscripted variables in local variable
lists?  It seems to me that it opens up a bag of worms with no strong
motivation.

              -s

Here are some issues:

      lis: [5,6,7]$
      lambda([a,a[1]], makelist(a[i],i,1,3))(lis,25) => [5,6,7], [25,6,7],
or aliasing error?
      lambda([q,a], q[1])('a,[5,6])  => 5       (current behavior)
      lambda([q,a[1]], q[1])('a,lis) => ?

      foo[x] := if x<0 then 0 else foo[x-1]+1$
      [ lambda([foo[1]], foo[2] )(5), foo[1], foo[2] ] => [ 6, 1, 6 ] ???!!!

      [ lambda([q], q[1]: 3)(lis), lis ] => [ 3, [3,6,7] ]          (current
behavior, OK)
      lambda([q,q[1]], q[1]:1, q) (lis,99) => [5,6,7]? or [1,6,7]?

On 3/4/07, Robert Dodier <robert.dodier at gmail.com> wrote:
>
> Hello,
>
> At present local variables created within block or within a function
> (named or unnamed) must be symbols, not subscripted variables....
>