Why Subclass When You Can Categorize

Recently, I’ve been trying to subclass NSString and add a method that I’ll be using in my application. After reading “Categories” by John Muchow, I decided to use categories. Instead of creating a new class, I would just add methods to an existing class. Here is a simple example adding a newFunction to NSString. In…