[Q] omissible method declaration in interface file
[Q] omissible method declaration in interface file
- Subject: [Q] omissible method declaration in interface file
- From: JongAm Park <email@hidden>
- Date: Sat, 27 May 2006 01:07:40 -0700
I would like to ask a question about "omissible method declaration in
interface files" and hope someone explain me "why" about the background
of this issue.
Also, I would like to ask Objective-C language designers & implmenters,
if there is any plan to change this.
Whenever I use the Objective-C language, I feel something weird.
You can omit method declaration for a class in its interface file.
According to Apple's Obj-C document, it says :
"Finally, through its list of method declarations, the interface file
lets other modules know what messages can be sent to the class object
and instances of the class. Every method that can be used outside the
class definition is declared in the interface file; methods that are
internal to the class implementation can be omitted."
Well... isn't it be controlled by @private, @protected, and @public?
It would be better to prevent errors related to wrong declaration of
methods in a class, if method declaration is not omissible.
Also, it would be more helpful to understand existing codes which is not
written by yourselves. If things are omitted in interface files and they
are written in their implementation files, it would be easy to lose
track, and although some methods are deleted accidently from the
implementation file, it would be easier to figure out which one is
omitted or not.
Probably there is reason the Obj-C was designed this way.
Can anyone explain this to me? Or if you are a Obj-C designer /
implementer, do you have any plan to change this behaviour?
Thank you.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden