Skip to content

Documentation clarifications, etc #1

mralexgray opened this Issue Mar 30, 2013 · 2 comments

2 participants


Usability would be improved on these with clearer documentation… I really wanna use these, but without a lot of testing.. its hard to know what to expect..

For example..

When a CWQueue dequeues all the objects initialized from a NSArray it will
enumerate object them in the same order in which they were added in the array
going over object at index 0,1,2...etc.

This is undefined, in my head.

Machx commented Mar 30, 2013

Oops there is a spelling mistake there in that "object" should have been "over". Sorry about that, I just fixed it. Basically this is saying that since NSArrays are ordered sets of objects when it dequeues them it will take the order that it is given in the array as the order it should dequeue them in. For example...

CWQueue *queue = [[CWQueue alloc] initWithArray:@[ @5, @3, @1, @9 ]];

The order of objects in the given array passed to it is 5,3,1,9. So on the 1st dequeue you will get 5, then 3, then 1,etc. etc. If we made a method to allow it to accept a NSSet of the same objects there would be no guarantee of the order in which you dequeue things in. You can see an example of this in action in the unit tests here

Machx commented Apr 15, 2013

since I haven't heard anything I am hoping the above comment & updated documentation clarifies this for you. If it still doesn't feel free to open up another issue and i'll try to address it as best I can. Thanks

@Machx Machx closed this Apr 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.