March 4, 2014
10:40 p.m.
On Wed, Mar 5, 2014 at 9:31 AM, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
Does `b[1]` give you an unevaluated thunk object?
I would say that `b[1]` should create a brand new thunk object of that expression. On evaluation of that, it'll look up b, subscript it, and touch the thunk. When it does, it Schrodingers itself into a value and that's that. In my opinion, __getitem__ isn't a problem, but __setitem__ is. Somewhere along the way, you have to be able to "hold" a thunk as a thunk. I've no idea how that works when you pass it around from function to function. ChrisA