According to Cocoa/OpenStep practice, init* should be an instance
method. The corresponding class method would be newWithFoo:andBar:,
or fooBarWithFoo:andBar: if it autorelease the return value. Also,
the return type should be OBJECT to allow clean overriding of
superclass initialisers with the same name.
Indeed. However, keep in mind that the wiki page intends to present
an overview and be concise. To the Modula-2 programmer the concept of
dynamic typing is foreign and thus for illustrative reasons it was
important to show that the method returns Foobar the class. Agreed,
we'll have to work on that a bit to strike a better balance.
The only reason why initWithFoo:andBar: is presented as a class
method is to show that there is a syntactical destinction between
class methods and instance methods, a concept that will again be
foreign to Modula-2 and Pascal programmers. But the idea to use
newWithFoo:andBar: as an example instead is great. We'll change that.
Thanks a lot for your feedback.
rgds
ObjM2 project
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/objc-language/email@hidden