Re: State of instance variables defined at instantiation?
Re: State of instance variables defined at instantiation?
- Subject: Re: State of instance variables defined at instantiation?
- From: Wade Tregaskis <email@hidden>
- Date: Wed, 28 May 2003 08:16:06 +1000
This is only a problem if you don't provide other init methods. In
such a case, the user should probably be using them anyway, and so
the lack of a generic init method would be unimportant.
ok, thanks. is there ever a time that you can get away with just
alloc-ing an object, and not init-ing it? and continue as usual?
Well, you can, probably without ill-effect in most cases, if the
default init doesn't actually do anything. But it's bad form, because
it may well break your code in future (if and when the init function
actually does something important). Plus it'll confuse people reading
your code - "why haven't they initialized any of these?".
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.