On Wed, 23 Nov 2016, Sven Schreiber wrote:
Am 22.11.2016 um 23:10 schrieb Allin Cottrell:
> This is no doubt something for aim for, though it will take some thought
> and careful redesign. However, even now we should support at least one
> level of nesting, which is why I'm ready to acknowledge the failure
> above as a bug.
Thanks, and here's something that might be related:
<hansl>
matrix m1 = ones(3,1)
m1[,1] = m1[,1] + 3
matrices mm = defarray(ones(3,1))
mm[1][,1] = mm[1][,1] + 5 # fails
</hansl>
However, I'm probably one snapshot behind, so this might have been fixed by
your latest changes. Or it might count as second-level-nesting.
I don't think you're behind in any relevant respect; and I'd be
inclined to call this second-level nesting. It would be nice to have
it working, but rather than coming up with a customized hack to
support this particular syntax, I'd rather wait until we're able to
support more general recursion of the member-of relation on the
left.
It seems to me that this is inherently more difficult than arbitrary
recursion on the right. On the right, it's just a matter of
retrieval, while on the left we have to worry about a possible chain
of modification of objects (although in this particular case there's
no chain, since replacing an element of a matrix doesn't change the
memory address of the matrix, and hence doesn't start any "ripple
effect").
Allin