Hi Jonathan, In 7.11 there is the following sentence. "The empty array literal {} is used to denote an empty queue. If an initial value is not provided in the declaration, the queue variable is initialized to the empty queue." In light of this, I am having a problem understanding what you are getting at when you mention an "uninitialized queue". Is there such a thing? Neil Jonathan Bromley wrote On 11/27/07 05:53 AM,: > hi EC, > > I've added a note to 974 proposing that it be closed as > duplicating (a small part of) 1447. > > 958 is a little more problematic - it asks what the .size > method and $size() function should return when applied to > uninitialized dynamic arrays or queues. > > My personal view is that there is little point in trying > to distinguish between a "null" (uninitialized) queue or > dynamic array and one having zero size. If dynamic array > and queue variables were in fact *references* to the > underlying array object, I'd take a very different view. > But they're not - at least, not from the user's viewpoint. > The tools I've tried all seem to agree with me, and > therefore disagree with the current LRM. > > I therefore plan to write a short proposal saying that > uninitialized queues and dynamic arrays have a .size() > of zero, and yield zero from the $size() system function. > > However, that's not the end of it. We also have the other > functions $left, $right, $low, $high, $increment to consider. > At present, 19.7 says... > > When used on a dynamic array or queue dimension, > these functions return information about the > current state of the array. If the dimension is > currently empty, these functions shall return > a 'x. > > This seems very strange for $increment, which surely > should always return -1 for queues and dynamic arrays. > I would also have thought that $left and $low should > always return 0 even if the array is empty. The > interesting question is whether $right/$high should > return -1 or 'x. If we agree that an empty queue or > dynamic array is a legitimate object, and that an > uninitialized queue or dynamic array is indistinguishable > from an empty one, then I would have thought that -1 > would make more sense. > > Opinions? Please? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Nov 28 16:29:56 2007
This archive was generated by hypermail 2.1.8 : Wed Nov 28 2007 - 16:30:25 PST