|
I think the primary benefit is having an array work like an array. So if you could essentially have a "writer" mark an array as of size X, and then let the "reader" use "#" to get this, that would also work. Both "empty" and declarative array sizes provide a way for a structure creator to communicate to a reader information about the structure, using a mechanism (the # operator) favored by Lua. To my mind all the workarounds fall into two categories: -- A private contract that communicates this outside of # … which seems to suggest that # is not very useful. -- Using a metatable to create custom behavior, which preserves # semantics but requires the writer to perform considerably more work. My feeling was that simply adding a standard way to do this avoided both of these work-arounds. Anyway, clearly the issue has been decided, though perhaps by a less than impressive process. --Tim On Jun 30, 2013, at 3:55 PM, Parke <parke.nexus@gmail.com> wrote:
|