[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Find more ObjC methods

From: David Ayers
Subject: Re: PATCH: Find more ObjC methods
Date: Tue, 07 Oct 2003 19:05:41 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916

Devang Patel wrote:

And we are discussing in this
thread whether we should add new command line option to
enable 'wrong' compiler warnings. I do not approve such patch.

Why do you insist that the warning is wrong? (yes the wording was misleading but I'm sure there are others.) You are correct that ObjC doesn't have a notion of private methods. Yet the concept of privat methods has been achieved by a common convention in many implemations by not declaring them in @interfaces. This effectively made the declarations visible only to the current @implementation context. If the scope was intended to be global to the translation unit, then you declared it in an @interface local to the translation unit.

Now you have added a new "feature" that allows the compiler to find and use the correct prototype for a method used outside of the intended scope . Fine, or even good! But why do you reject the feature of having a method private to the current @implementatin scope by the use of a wide spread convention! I know that ObjC doesn't formally support private methods, and I think it would be a waste of resources to try to implement something in the runtimes. All we're asking for is to give us back a warning when a method is being used outside of the scope it was intended for. In fact we're also offering to do the work.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]