
Back to the Mac? 12 features from iOS I'd like to see in Lion - barredo
http://cocoawithlove.com/2010/11/back-to-mac-12-features-from-ios-i-like.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+CocoaWithLove+%28Cocoa+with+Love%29&utm_content=Google+Reader
======
pmjordan
The other points seem pretty valid [1] but points 1-3 and 8 appear to be prime
candidates for category extensions. I'm aware of their drawbacks but they
could be applied here with little inconvenience and they dilute an otherwise
interesting article somewhat. (I almost gave up reading after reading the
first 3 complaints in what appeared to be pure API bitching)

[1] I have almost zero experience with "grown-up" Cocoa and plenty with iOS,
but assuming their factual correctness, they seem valid concerns.

~~~
pornel
API is a very important aspect of a platform, so I think "API bitching" is
still valid complaint.

Improvements in Cocoa Touch make parts of Mac Cocoa look old and needlessly
complicated. That's definitely a problem that needs addressing.

Categories can patch some of that, but you still have to write ugly code once,
and categories are not as elegant as fix in the API itself (e.g. you have to
use odd/prefixed method names in categories to avoid collision with potential
future API).

~~~
alextgordon
_Categories can patch some of that, but you still have to write ugly code
once, and categories are not as elegant as fix in the API itself (e.g. you
have to use odd/prefixed method names in categories to avoid collision with
potential future API)._

If the API is really obvious then this doesn't matter, since the category will
simply replace the API method with something that does exactly the same thing.

For example, there's no real need to prefix a category implementation of
-cgColor because it couldn't conceivably do anything else.

If it really bothers you, then you can use the runtime to load methods into
NSColor, first checking to see if they exist.

------
spot
I wish Lion would protect me from pornography and dangerous apps like iOS
does.

~~~
ryanpetrich
I assume you've disabled Safari then?

