Objective-C literals for NSSet and NSOrderedSet?

There is no Objective-C literal syntax for NSSet. It doesn’t really make sense to use index subscripting to access NSSet elements, although key-based subscripting might. Either by wrapping or subclassing, you could add your own. (Correction): Originally I had thought NSOrderedSet wasn’t supported either, but it turns out that using index subscripting is supported, but … Read more

Why doesn’t NSOrderedSet inherit from NSSet?

I went through the interface of NSSet and you’re right, ordered sets appear to satisfy the Liskov substitution principle and could therefor inherit from NSSet. There is one little method that breaks this: mutableCopy. The return value of mutableCopy must be an NSMutableSet, but NSMutableOrderedSet should inherit from NSOrderedSet. You can’t have both. Let me … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)