Mattt Thompson

Mattt Thompson

Mattt Thompson (@mattt) is a writer and developer from the Rustbelt.

Articles

  1. Swift Documentation

    Code structure and organization is a matter of pride for developers. Clear and consistent code signifies clear and consistent thought. Read on to learn about the recent changes to documentation with Xcode 7 & Swift 2.0.

  2. Changing of the Guard

    An important site announcement.

  3. Reader Submissions -
    New Year's 2015

    2014 was an incredible year professionally for Apple developers. With a deluge of new developments—both from Cupertino and the community at large—there were no shortage of interesting tidbits for readers to share.

  4. The Death of Cocoa

    For many of us, the simplicity, elegance, and performance of Apple’s hardware and software working together are the reason why we build on their platforms. And yet, after just a few months of working with Swift, Cocoa has begun to lose its luster.

  5. WatchKit

    After taking a look at WatchKit, there were a few things that jumped out coming from UIKit. They’re the kind of subjective, opinionated things that don’t make for good documentation, but might be interesting or useful to anyone else as they’re getting started.

  6. Inter-Process Communication

    In many ways, the story of Apple has been about fusing together technologies through happy accidents of history to create something better than before: OS X as a hybrid of MacOS & NeXTSTEP. Objective-C as the combination of Smalltalk’s OOP paradigm and C. iCloud as the byproduct of MobileMe and actual clouds (presumably).

  7. Swift System Version Checking

    C uses preprocessor directives capable of unspeakable evil. Swift has a safe subset of preprocessor directives. So how do we check system version for API compatibility?

  8. UIAlertController

    Did you know that UIAlertView and UIActionSheet (as well as their respective delegate protocols) are deprecated in iOS 8? It’s true.

  9. Swift Comparison Protocols

    Objective-C required us to wax philosophic about the nature of equality and identity. To the relief of any developer less inclined towards handwavy treatises, this is not as much the case for Swift.

  10. PHImageManager

    Yesterday’s article described various techniques for resizing images using APIs from the UIKit, Core Graphics, Core Image, and Image I/O frameworks. However, that article failed to mention some rather extraordinary functionality baked into the new Photos framework which takes care of all of this for you.

  11. Image Resizing Techniques

    Since time immemorial, iOS developers have been perplexed by a singular question: ‘How do you resize an image?’. This article endeavors to provide a clear answer to this eternal question.

  12. RawOptionSetType

    Swift enumerations are a marked improvement over the NS_ENUM macro in Objective-C. Unfortunately, NS_OPTIONS does not compare as favorably.

  13. Swift Default Protocol Implementations

    Protocols are the foundation of generics in Swift, but suffer from the lack of a built-in way to provide default implementations for methods. However, there is an interesting workaround in Swift that you probably haven’t noticed.

  14. WKWebView

    iOS has a complicated relationship with the web. And it goes back to the very inception of the platform nearly a decade ago.

  15. Swift Literal Convertibles

    Last week, we wrote about overloading and creating custom operators in Swift, a language feature that is as powerful as it is controversial. By all accounts, this week’s issue threatens to be equally polarizing, as it covers a feature of Swift that is pervasive, yet invisible: literal convertibles.

  16. Swift Operators

    Operators in Swift are among the most interesting and indeed controversial features of this new language.

  17. Alamofire

    Although we still have a few months to wait before we can ship apps in Swift, there is already a proliferation of open source projects built with this new language. One such project is Alamofire.

  18. XCTestCase /
    XCTestExpectation /
    measureBlock()

    This week, we’ll take a look at XCTest, the testing framework built into Xcode, as well as the exciting new additions in Xcode 6: XCTestExpectation and performance tests.

  19. NSOperation

    In life, there’s always work to be done. Every day brings with it a steady stream of tasks and chores to fill the working hours of our existence. Productivity is, as in life as it is in programming, a matter of scheduling and prioritizing and multi-tasking work in order to keep up appearances.

  20. NSCalendarUnitYear

    NSHipster.com was launched 2 years ago to the day. Each week since has featured a new article on some obscure topic in Objective-C or Cocoa (with only a couple gaps). Let’s celebrate with some cake.

  21. Clang Diagnostics

    Diagnostics combine logic with analytics to arrive at a conclusion. It’s science and engineering at their purest. It’s human reasoning at its most potent. For us developers, our medium of code informs the production of subsequent code, creating a positive feedback loop that has catapulted the development of technology exponentially over the last half century. For us Objective-C developers specifically, the most effective diagnostics come from Clang.

  22. iOS 8

    Ask anyone, and they’ll tell you: WWDC 2014 was the one of the most exciting in recent memory. This week, we’ll take a look beneath the headline features, and share some of the more obscure APIs that everyone should know about.

  23. NSHipster Quiz #6

    Our second annual WWDC Pub Quiz! With dozens of teams, comprised of developers from all around the world, the competition was fierce. How will you stack up?

  24. CocoaPods

    When well thought-out and implemented, infrastructure is a multiplying force that drives growth and development. In the case of Objective-C, CocoaPods has provided a much-needed tool for channeling and organizing open source participation.

  25. Benchmarking

    Abstractions are necessary for doing meaningful work, but they come at a cost. By benchmarking, a programmer can uncover the hidden performance characteristics of their code, and use this information to optimize accordingly.

  26. NSHipster Quiz #5

    This fifth incarnation of the NSHipster Quiz took on a distinct North-of-the-Border flavor, as part of the NSNorth conference in Ottawa, Ontario. Think you’re up to the challenge, eh?

  27. IBAction / IBOutlet / IBOutletCollection

    In programming, what often begins as a necessary instruction eventually becomes a vestigial cue for humans. For developers just starting with Cocoa & Cocoa Touch, the IBAction, IBOutlet, and IBOutletCollection macros are particularly bewildering examples of this phenomenon

  28. MKGeodesicPolyline

    We knew that the Earth was not flat long before 1492. Early navigators observed the way ships would dip out of view over the horizon many centuries before the Age of Discovery. For many iOS developers, though, a flat MKMapView was a necessary conceit until recently.

  29. UIActivityViewController

    The relationship between code and data has long been a curious one.

  30. Xcode Plugins

    This week on NSHipster: a roundup of some of the most useful and exciting plugins for Xcode—ready for you to try out yourself today!

  31. Configuration Profiles

    One of the major criticisms of iOS as a platform is how locked down it is. iOS Configuration Profiles offer an interesting mechanism to work around these restrictions.

  32. AVSpeechSynthesizer

    Though we’re a long way off from Hal or Her, we should never forget about the billions of other people out there for us to talk to.

  33. NSURL /
    NSURLComponents

    Of all the one-dimensional data types out there, URIs reign supreme. Here, in a single, human-parsable string, is every conceivable piece of information necessary to encode the location of any piece of information that has, does, and will ever exist on a computer.

  34. Empathy

    We naturally want to help one another, to explain ideas, to be generous and patient. However, on the Internet, human nature seems to drop a few packets.

  35. UIReferenceLibraryViewController /
    DCSDictionaryRef/
    /usr/share/dict/words

    Though widely usurped of their ‘go-to reference’ status by the Internet, dictionaries and word lists serve an important role behind the scenes of functionality ranging from spell check, grammar check, and auto-correct to auto-summarization and semantic analysis.

  36. NSTemporaryDirectory /
    NSItemReplacementDirectory /
    mktemp(3)

    Volumes have been written about persisting data, but when it comes to short-lived, temporary files, there is very little to go on for Objective-C. (Or if there has, perhaps it was poetically ephemeral itself).

  37. Namespacing

    Namespacing is the preeminent bugbear of Objective-C. A cosmetic quirk with global implications, the language’s lack of identifier containers remains a source of prodigious quantities of caremad for armchair language critics.

  38. Method Swizzling

    Method swizzling is the process of changing the implementation of an existing selector. It’s a technique made possible by the fact that method invocations in Objective-C can be changed at runtime, by changing how selectors are mapped to underlying functions in a class’s dispatch table.

  39. Associated Objects

    Associated Objects is a feature of the Objective-C 2.0 runtime, which allows objects to associate arbitrary values for keys at runtime. It’s dark juju, to be handled with as much caution as any other function from objc/runtime.h

  40. MKTileOverlay,
    MKMapSnapshotter &
    MKDirections

    Unless you work with MKMapView. on a regular basis, the last you may have heard about the current state of cartography on iOS may not have been under the cheeriest of circumstances. Therefore, it may come as a surprise maps on iOS have gotten quite a bit better in the intervening releases. Quite good, in fact.

  41. Stewardship

    Stewardship is an old word. It evokes the ethic of public service and duty. To be a steward is to embody the responsibilities that come with ownership. It is an act that justifies authority through continued accountability; both the greatest challenge and reward of creating and maintaining a project.

  42. Extended File Attributes

    Amidst revelations of widespread spying by the NSA, the concept of metadata has taken an unexpected role in the national conversation about government surveillance. What is it? And how much does it reveal about us and our daily habits? These are questions that the American people are asking, and they deserve an answer.

  43. NSRange

    NSRange is one of the essential types of Foundation. Passed around and returned in methods throughout the framework, being well-versed in this struct has a range of benefits.

  44. Reader Submissions -
    New Year's 2014

    As we prepare to increment our NSDateComponents -year by 1, it’s time once again for NSHipster end-of-the-year Reader Submissions!

  45. UIApplicationDelegate launchOptions

    AppDelegate is the dumping ground for functionality in iOS.

  46. Multipeer Connectivity

    As consumer web technologies and enterprises race towards cloud infrastructure, there is a curious and significant counter-movement towards connected devices. The Multipeer Connectivity APIs, introduced in iOS 7, therefore may well be the most significant for the platform.

  47. NSNotification &
    NSNotificationCenter

    Any idea is inextricably linked to how its communicated. A medium defines the form and scale of significance in such a way to shape the very meaning of an idea. Very truly, the medium is the message.

  48. NSFileManager

    File systems are a complex topic, with decades of history, vestigial complexities, and idiosyncrasies, and is well outside the scope of a single article. And since most applications don’t often interact with the file system much beyond simple file operations, one can get away with only knowing the basics.

  49. NSFormatter

    Conversion is the tireless errand of software development. Most programming tasks boil down to some variation of transforming data into something more useful.

  50. xctool

    Control the build system, and you control the destiny of the language, its ecosystem, and community.

  51. NSHipster Quiz #4

    The fourth and final quiz of the year. Do you have what it takes to be the NSArray -firstObject among your peers?

  52. Launch Arguments &
    Environment Variables

    There are a number of options that can be passed into a target’s scheme to enable useful debugging behavior, but like a fast food secret menu, they’re obscure and widely unknown.

  53. NSError

    NSError is the unsung hero of the Foundation framework. Passed gallantly in and out of perilous method calls, it is the messenger by which we are able to contextualize our failures.

  54. Key-Value Observing

    Ask anyone who’s been around the NSBlock a few times: Key-Value Observing has the worst API in all of Cocoa. It’s awkward, verbose, and confusing. And worst of all, its terrible API belies one of the most compelling features of the framework.

  55. Xcode Key Bindings & Gestures

    Xcode key bindings and gestures not only shave off seconds of precious work, but make you look more confident, competent, and cromulent in the process.

  56. iOS 7

    With the NDA finally lifted, we can finally talk about all of the amazing new APIs in iOS 7.

  57. AFNetworking 2.0

    AFNetworking is one of the most widely used open source projects for iOS and OS X development. It’s about as mainstream as it gets. But have you heard about the sequel?

  58. Network Link Conditioner

    Product design is about empathy. Knowing what a user wants, what they like, what they dislike, what causes them frustration, and learning to understand and embody those motivations in design decisions—this is what it takes to make something insanely great.

  59. Xcode Snippets

    iOS development all but requires the use of Xcode. And if we’re resigned to use an IDE in our development workflow, we might as well make the most of it, right? So this week on NSHipster, we’re going to talk about one of the more powerful yet underused features of Xcode: Code Snippets

  60. Equality

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

  61. NSHashTable & NSMapTable

    NSSet and NSDictionary, along with NSArray are the workhorse collection classes of Foundation. Unlike other standard libraries, implementation details are hidden from developers, allowing them to write simple code and trust that it will be (reasonably) performant.

  62. rand(3) / random(3) / arc4random(3) / et al.

    What passes for randomness is merely a hidden chain of causality. Of course, app developers could care less about philosophy—what they want is code. Thus, our goal this week: to clear up all of the lingering questions and misunderstandings about doing random things in Objective-C

  63. Documentation

    There’s an adage among Cocoa developers that Objective-C’s verbosity lends its code to being effectively self-documenting. Between longMethodNamesWithNamedParameters: and the explicit typing of those parameters, Objective-C methods don’t leave much to the imagination.

  64. NSHipster Quiz #3

    Test your mettle as NSHipster Pub Quiz goes on the road, to New York City!

  65. UIMenuController

    Mobile usability today is truly quite remarkable—especially considering how far it’s come in just the last decade. What was once a clumsy technology relegated to the tech elite has now become the primary mode of computation for a significant portion of the general population.

  66. NSPredicate

    NSPredicate is a Foundation class that specifies how data should be fetched or filtered. Its query language, which is like a cross between a SQL WHERE clause and a regular expression, provides an expressive, natural language interface to define logical conditions on which a collection is searched.

  67. NSExpression

    Cocoa is the envy of other standard libraries when it comes to querying and arranging information. With NSPredicate, NSSortDescriptor, and an occasional NSFetchRequest, even the most complex data tasks can be reduced into just a few, extremely-understandable lines of code.

  68. NSFastEnumeration / NSEnumerator

    Enumeration is where computation gets interesting. It’s one thing to encode logic that’s executed once, but applying it across a collection—that’s what makes programming so powerful.

  69. NSUUID /
    CFUUIDRef /
    UIDevice -uniqueIdentifier /
    -identifierForVendor

    Until recently, it was trivial to uniquely identify devices between application launches, and even across applications: a simple call to UIDevice -uniqueIdentifier, and you were all set.

  70. Object Subscripting

    Xcode 4.4 quietly introduced a syntactic revolution to Objective-C. Like all revolutions, however, its origins and agitators require some effort to trace.

  71. NSHipster Quiz #2

    Go up against some of the brightest minds in all things Apple at this special WWDC edition of NSHipster Quiz. Sure, you conform to the NSHipster protocol, but do you have what it takes to implement all of the @optional methods? Take the quiz and see for yourself!

  72. NSDataDetector

    Until humanity embraces RDF for all of their daily interactions, a large chunk of artificial intelligence is going to go into figuring out what the heck we’re all talking about. Fortunately for Cocoa developers, there’s NSDataDetector.

  73. Unit Testing

    Unit Testing is an emotional topic for developers. It inspires a sense of superiority to its most zealous adherents, and evokes a feeling of inadequacy to non-practitioners. Cargo Cults like TDD stake their reputation on unit testing to the point of co-opting and conflating utility with morality.

  74. Core Data Libraries & Utilities

    We were a bit hard on Core Data last week, so for this issue of NSHipster, we bring you a guided tour of the best open source libraries for working with Core Data. Read on to see how you might make the most from your Core Data experience.

  75. NSCoding / NSKeyedArchiver

    Among the most important architectural decisions made when building an app is how to persist data between launches. The question of how, exactly, to re-create the state of the app from the time it was last opened; of how to describe the object graph in such a way that it can be flawlessly reconstructed next time.

  76. GPUImage

    GPUImage is a BSD-licensed iOS library that lets you apply GPU-accelerated filters and other effects to images, live camera video, and movies. If you’re not careful, you may well end up creating a camera app by the end of the article.

  77. MKLocalSearch

    In all of the hubbub of torch burning and pitchfork raising, you may have completely missed a slew of additions to MapKit in iOS 6.1.

  78. NSHipster Quiz #1

    Test your knowledge of general programming knowledge, Cocoa APIs, and Apple trivia in this first-ever NSHipster Quiz. How NSHip are you?

  79. NSSecureCoding

    A short post for this week: everything you need to know about NSSecureCoding.

  80. BOOL / bool / Boolean / NSCFBoolean

    Once again, encoding our logical universe into the cold, calculating bytecode of computers forces us to deal with these questions one way or another. And as you’ll see from our discussion of boolean types in Objective-C and its kin, truth is indeed stranger than fiction.

  81. iCloud

    Perhaps what Apple is most renowned for is its consistent track record for creating great webservices. From consumer products like MobileMe and Ping to developer tools including the Provisioning Portal and iTunes Connect, Apple has continued to set new standards for convenience, robustness, and extensibility.

  82. Search Kit

    Search Kit is a C framework for searching and indexing content in human languages. It supports matching on phrase or partial word, including logical & wildcard operators, and can rank results by relevance. Search Kit also provides document summarization, which is useful for generating representative excerpts. And best of all: it’s thread-safe.

  83. C Storage Classes

    In C, the scope and lifetime of a variable or function within a program is determined by its storage class. Understanding these storage classes allows us to decipher common incantations found throughout Objective-C

  84. UIAppearance

    UIAppearance allows the appearance of views and controls to be consistently defined across the entire application.

  85. Back Row

    Back Row is a private framework used in the Apple TV user experience. Rather than waiting for Apple to open up the Apple TV SDK, one can take matters into their own hands.

  86. NSAssertionHandler

    Programming incorporates numerous disciplines of human reasoning, from high-level discourse and semantics—the story we tell each other to explain how a system works—to the mathematical and philosophical machinery that underpins everything.

  87. ReactiveCocoa

    Breaking from a tradition of covering Apple APIs exclusively, this edition of NSHipster will look at an open source project that exemplifies a brave new era of open source contribution to Objective-C: ReactiveCocoa.

  88. NSURLCache

    NSURLCache provides a composite in-memory and on-disk caching mechanism for URL requests to your application. As part of Foundation’s URL Loading System, any request loaded through NSURLConnection will be handled by NSURLCache.

  89. Type Encodings

    From number stations and numerology to hieroglyphics and hobo codes, there is something truly fascinating about finding meaning that hides in plain sight. Though hidden messages in and of themselves are rarely useful or particularly interesting, it’s the thrill of the hunt that piques our deepest curiosities.

  90. NSValue

    Boxing is the process of encapsulating scalars and value types with an object container, and is primarily used to store those values in collection objects—namely arrays and dictionaries. In Foundation, the reigning featherweight champion of boxing is NSValue.

  91. NSLocalizedString

    Strings are perhaps the most versatile data type in computing. They’re passed around as symbols, used to encode numeric values, associate values to keys, represent resource paths, store linguistic content, and format information. Having a strong handle on user-facing strings is essential to making a great user experience.

  92. __attribute__

    A recurring theme of this publication has been the importance of a healthy relationship with the compiler. Like any craft, one’s effectiveness as a practitioner is contingent on how they treat their tools. Take good care of them, and they’ll take good care of you.

  93. nil / Nil / NULL / NSNull

    Understanding the concept of nothingness is as much a philosophical issue as it is a pragmatic one. We are inhabitants of a universe of somethings, yet reason in a logical universe of existential uncertainties. As a physical manifestation of a logical system, computers are faced with the intractable problem of how to represent nothing with something.

  94. Reader Submissions -
    New Year's 2013

    In celebration of the forthcoming year++, I thought it’d be fun to compile a list of some of your favorite tips and tricks of the trade. Readers were asked to submit their favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else they thought is cool.

  95. CGGeometry

    Unless you were a Math Geek or an Ancient Greek, Geometry was probably not your favorite subject in high school. No, chances are that you were that kid in class who dutifully programmed all of the necessary formulae into your TI-8X calculator. Keeping in the tradition of doing the least amount of math possible, here are some semi-obscure CoreGraphics functions to make your job easier.

  96. instancetype

    Objective-C is a rapidly evolving language, in a way that you just don’t see in established programming languages. Developments range from the mundane to paradigm-changing, but telling the difference takes practice. Because we’re talking about low-level language features, it’s difficult to understand what implications they may have higher up with API design.

  97. KVC Collection Operators

    Rubyists laugh at Objective-C’s bloated syntax. Although we lost a few pounds over the summer with our sleek new object literals, those Red-headed bullies still taunt us with their map one-liners and their fancy Symbol#to_proc. Fortunately, Key-Value Coding has an ace up its sleeves.

  98. NSOrderedSet

    Why isn’t NSOrderedSet a subclass of NSSet? The answer may surprise you.

  99. NS_ENUM & NS_OPTIONS

    A skilled Objective-C developer is able to gracefully switch between Objective and Procedural paradigms, and use each to their own advantage.

  100. NSValueTransformer

    Of all the Foundation classes, NSValueTransformer is perhaps the one that fared the worst in the shift from OS X to iOS. But you know what? It’s ripe for a comeback. With a little bit of re-tooling and some recontextualization, this blast from the past could be the next big thing in your application.

  101. NSURLProtocol

    Foundation’s URL Loading System is something that every iOS developer would do well to buddy up with. And of all of networking classes and protocols of Foundation, NSURLProtocol is perhaps the most obscure and powerful.

  102. UILocalizedIndexedCollation

    UITableView starts to become unwieldy once it gets to a few hundred rows. If users are reduced to frantically scratching at the screen like a cat playing Fruit Ninja in order to get at what they want… you may want to rethink your UI approach.

  103. NSLinguisticTagger

    NSLinguisticTagger is a veritable Swiss Army Knife of linguistic functionality, with the ability to tokenize natural language strings into words, determine their part-of-speech & stem, extract names of people, places, & organizations, and tell you the languages & respective writing system used in the string.

  104. AddressBookUI

    Address Book UI is an iOS framework for displaying, selecting, editing, and creating contacts in a user’s Address Book. Similar to the Message UI framework, Address Book UI contains a number of controllers that can be presented modally, to provide common system functionality in a uniform interface.

  105. @

    If we were to go code-watching for Objective-C, what would we look for? Square brackets, ridiculously-long method names, and @’s. “at” sign compiler directives are as central to understanding Objective-C’s gestalt as its ancestry and underlying mechanisms. It’s the sugary glue that allows Objective-C to be such a powerful, expressive language, and yet still compile all the way down to C.

  106. #pragma

    #pragma declarations are a mark of craftsmanship in Objective-C. Although originally purposed for compiling source code across many different compilers, the modern Xcode-savvy programmer uses #pragma declarations to very different ends.

  107. UICollectionView

    UICollectionView single-handedly changes the way we will design and develop iOS apps from here on out. This is not to say that collection views are in any way unknown or obscure. But being an NSHipster isn’t just about knowing obscure gems in the rough. Sometimes, it’s about knowing about up-and-comers before they become popular and sell out.

  108. NSCharacterSet

    Foundation boasts one of the best, most complete implementations of strings around. But a string implementation is only as good as the programmer who wields it. So this week, we’re going to explore some common uses–and misuses–of an important part of the Foundation string ecosystem: NSCharacterSet.

  109. UIAccessibility

    Accessibility, like internationalization, is one of those topics that’s difficult to get developers excited about. But as you know, NSHipster is all about getting developers excited about this kind of stuff.

  110. NSLocale

    Internationalization is like flossing: everyone knows they should do it, but probably don’t.

  111. CFBag

    In the pantheon of collection data types in computer science, bag doesn’t really have the same clout as lists, sets, associative arrays, trees, graphs, or priority queues. In fact, it’s pretty obscure. You’ve probably never heard of it.

  112. NSIncrementalStore

    Even for a blog dedicated to obscure APIs, NSIncrementalStore sets a new standard. It was introduced in iOS 5, with no more fanfare than the requisite entry in the SDK changelog. Ironically, it is arguably the most important thing to come out of iOS 5, which will completely change the way we build apps from here on out.

  113. CFStringTransform

    NSString is the crown jewel of Foundation. But as powerful as it is, one would be remiss not to mention its toll-free bridged cousin, CFMutableString—or more specifically, CFStringTransform.

  114. NSDateComponents

    NSDateComponents serves an important role in Foundation’s date and time APIs. By itself, it’s nothing impressive—just a container for information about a date (its month, year, day of month, week of year, or whether that month is a leap month). However, combined with NSCalendar, NSDateComponents becomes a remarkably convenient interchange format for calendar calculations.

  115. NSSortDescriptor

    Sorting: it’s the mainstay of Computer Science 101 exams and whiteboarding interview questions. But when was the last time you actually needed to know how to implement Quicksort yourself?

  116. NSCache

    Poor NSCache, always being overshadowed by NSMutableDictionary. It’s as if no one knew how it provides all of that garbage collection behavior that developers take great pains to re-implement themselves.

  117. NSIndexSet

    NSIndexSet (like its mutable counterpart, NSMutableIndexSet) is a sorted collection of unique unsigned integers. Think of it like an NSRange that supports non-contiguous series. It has wicked fast operations for finding indexes in ranges or set intersections, and comes with all of the convenience methods you’d expect in a Foundation collection class.