@steipete well I prefer not to check it at all. There is nothing valuable in this check.
-
-
-
@daloog It’s convention and you’re in trouble if you don’t do that for class clusters or other special types. -
@steipete sure. There is cases when check is required be design. But general NSObject inheritance is 99% of my code. So I can skip it. -
- View other replies
-
-
-
-
- View other replies
- Show more
-
-
-
@steipete I like one the one line version, but with double (( as you've shown, even though it's not required by clang. - View other replies
-
@nicklockwood Oh there’s a warning for that, we run with -Weverything minus a few extremes. - View other replies
-
-
-
@steipete self=[super init]; Then use accessors to set ivars. No if. -
-
@nicklockwood@steipete Messages are ignored and you return nil. Perfect! (Also: usually, a [super init] nil return is non-recoverable) -
- View other replies
-
@nicklockwood@steipete Exactly. Which is why you don’t do ivar accesses but —> send messages <— -
@nicklockwood@steipete Apple’s recommendation to use direct ivar access in -init is mostly BS. -
- View other replies
-
@nicklockwood@steipete Just looks cleaner, easy to write, easy to read, straight to the point.pic.twitter.com/UtEH0QOQPW
- View other replies
- Show more
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Peter Steinberger
Alexey Demedeckiy
Marcel Weiher
Nick Lockwood