Archive for August 8, 2012

Wednesday, August 8, 2012

Why NSOrderedSet Doesn’t Inherit From NSSet

Tom Dalling:

There was an interesting question on StackOverflow this morning: Why doesn’t NSOrderedSet inherit from NSSet? It’s interesting because the reason is so easy to miss. I thought it would make a good blog post because it turned out to be a nice, real-life example of the Liskov substitution principle (herein abbreviated to LSP).

He points to the -mutableCopy method, but I think there’s a problem with the -isEqual: method even when considering only immutable sets. An ordered set wants to include order in its definition of equality, while a regular set cares only about membership. Equality can’t be implemented in a way that’s symmetric and transitive. Thus, it makes sense for them not to be subtypes.

An Open Letter to Tim Cook Regarding Apple ID Security

Rui Carmo:

I find it somewhat disturbing that a single username and password provides access to all my personal data on iCloud and to my iTunes Store account - and urge you to consider allowing customers to opt in to higher-grade security and allowing for privilege separation between different kinds of Apple IDs.

Relative Evaluation Report on S1, iPhone

John Paczkowski (via John Gruber):

Authored by Samsung’s product engineering team, the document evaluates everything from the home screen to the browser to the built-in apps on both devices. In each case, it comes up with a recommendation on what Samsung should do going forward, and in most cases, its answer is simple: Make it work more like the iPhone.

I’m torn here. On the one hand, these are such little details. It would be absurd to suggest that Samsung’s Web browser shouldn’t display the number of tabs because Safari does that on the iPhone. On a quick skim, I didn’t see anything that seems like it should be patentable. On the other hand, it’s unsettling that Samsung seems to be going through detail-by-detail to clone Apple’s design work.