Subject: Is "-init" really needed?



I recently saw some code where an object was alloced but there was no init:

Foo *foo = [Foo alloc];
foo.bar = ...

My blood pressure soared! My pulse quickened! I started breathing rapidly!

But then I though - heck, if Foo has NSObject as its super class, gee, maybe -init isn't really need. I mean, if all of Foo's ivars and properties are initialized, its a shortcut, right.

Right?

[Still trying to get pulse down...]

D
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to [email protected]



Programming list archiving by: Enterprise Git Hosting