Archives / Search ›

Steve Zellers: “The big loser in Mac OS X is the file system fragility problem.”

Yup. Cocoa makes things easy for the programmer, at the cost of fragility and poor error reporting: I still can't believe there is no result code or structured exception handling in Cocoa at all. Zip, zero. This is a huge failing: if the framework can't return specific errors to the programmer, then how can the programmer present intelligible error messages to the user? These are simple things like distinguishing 'file not found' from 'permission denied' from 'disk full', which Cocoa completely hides as a single boolean success/failure value despite their presence in the underlying BSD APIs.

The old Mac philosophy was to make things easy for the user, at the potential cost of pain and suffering for the programmer. I don't mind the pain and suffering all that much—I just spent the last five hours trying to fix some threading/corruption issues that I still haven't isolated with a (Cocoa) application, but I'd do it a hundred times over if it meant giving users an application that behaved stably and made sense.

As a programmer, I'd prefer the best of both worlds: an API that's easy to use, but robust and predictable for the user.

Comments are closed.