NSHipster is a journal of the overlooked bits in Objective-C, Swift, and Cocoa. Updated weekly.

This Week...

Hashable / Hasher

Our topic this week is Hashable and its new related type, Hasher. Together, they comprise the functionality underlying two of Swift’s most beloved collection classes: Dictionary and Set

Continue Reading

Updated and Expanded


The concept of equality is a central topic in philosophy and mathematics, with far-reaching implications for matters of ethics, justice, and public policy. Our task as programmers is to reconcile our logical and physical understanding of equality with the domains we model.

Continue Reading

Recent Articles


Machine learning has been at the heart of natural language processing in Apple platforms for many years, but it’s only recently that external developers have been able to harness it directly.


Making a claim that something will never be the case can feel like an invitation for the universe to prove otherwise. Fortunately for us, Swift lives up to this higher standard thanks to the unlikeliest of types.

Bug Reporting

If you’ve ever been told to “file a Radar” and wondered what that meant, this week’s article has just the fix.

Swift GYB

Not all code can be glamorous. In fact, a lot of the low-level infrastructure that makes everything work is a slog of boilerplate.


Some find regular expressions impenetrably incomprehensible, thick with symbols and adornments, more akin to a practical joke than part of a reasonable code base. Others rely on their brevity and their power, wondering how anyone could possibly get along without such a versatile tool in their arsenal. Happily, on one thing we can all agree: In NSRegularExpression, Cocoa has the most long-winded and byzantine regular expression interface you’re ever likely to come across.