Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<ul> <li><p>Built-in regular expression support (a la <a href="http://regexkit.sourceforge.net/" rel="nofollow noreferrer">RegexKit</a>) would be <em>extremely</em> handy. NSRegularExpression is available on iOS 4.0+, but it is still not available on Mac OS X yet.</p></li> <li><p>An easy way to progressively read NSString objects from a large text file without loading the entire thing into memory. (NSInputStream and NSFileHandle just don't measure up for that.)</p></li> <li><p>The ability to optionally make NSSet/NSMutableSet/NSCountedSet store and enumerate objects in sorted order (like a <a href="http://en.wikipedia.org/wiki/Binary_search_tree" rel="nofollow noreferrer">binary search tree</a>) would certainly be welcome. Same goes for Cocoa arrays — currently I have to call something like <code>-[NSArray sortedArrayUsingSelector:]</code> or <code>-[NSMutableArray sortUsingSelector:]</code> to get a sorted array, and for sets I have to create the array first.</p></li> <li><p>A heap / priority queue. A Cocoa wrapper around <a href="http://developer.apple.com/documentation/CoreFoundation/Reference/CFBinaryHeapRef/" rel="nofollow noreferrer">CFBinaryHeap</a> (which is definitely not as easy to use as Cocoa collections) would probably work.</p></li> <li><p>A dictionary that can store multiple values for each key, commonly known as a <em>multiset</em>. NSCountedSet is pretty much a multiset/bag, and it would be nice to have the same for key-value associations (NSMultiDictionary?) instead of having to roll my own.</p></li> <li><p>A friendly wrapper for <a href="http://developer.apple.com/documentation/Darwin/Conceptual/FSEvents_ProgGuide/" rel="nofollow noreferrer">FSEvents</a>. (CFFileDescriptor does some of the work, but it's not Cocoa-easy.)</p></li> <li><p>A method for creating an NSString from a format string and an array of objects (not just varargs). <a href="https://stackoverflow.com/questions/1058736/#1061750">This SO answer</a> shows an example. Getting it to work with primitives would be tricky... Maybe an NSPointerArray?</p></li> <li><p>Consistent, centralized APIs that simplify formatting (and parsing) phone numbers for a variety of locales. Currently you have to roll your own with an NSNumberFormatter (or NSScanner), and the process is tedious and error-prone. (For example, see <a href="https://stackoverflow.com/questions/665111/">NSNumberFormatter to format US Telephone Numbers</a> and <a href="https://stackoverflow.com/questions/1129521/">Remove all but numbers from NSString</a>.)</p></li> </ul> <p>Of course, I'm definitely a fan of <a href="http://cocoaheads.byu.edu/code/CHDataStructures" rel="nofollow noreferrer">a wide variety of data structures</a> in general, although Cocoa's simplicity is refreshing compared with some languages.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload