discuss-gnustep
[Top][All Lists]
Advanced

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

Re: PATCH: Find more ObjC methods


From: Ziemowit Laski
Subject: Re: PATCH: Find more ObjC methods
Date: Tue, 7 Oct 2003 11:43:45 -0700


On Tuesday, Oct 7, 2003, at 03:08 US/Pacific, David Ayers wrote:

Pete French wrote:

There is also a convention of not shoveling loads of things into the same source file in ObjC too though. If you stuck to one file per object or category then the problem doesnt arise. I would have said the new behaviour is very sensible - i.e. if a method on a class is visible in a source file then it is understood to be avaialble throughout the rest of the source file. Indeed, thats how I thought it already worked, and was rather siurprised to find it
doesnt!

The new behaviour seems 1) very reasonable and 2) enirely consistent with what C does. If you follow the convention of each category in its own source
file then you get the same warnings you do now.

Thank you. :-)


There are good reasons to #include/#import several implementation files into a single compilation unit. (e.g. access to static global variable/functions). We use this in several larger projects, where the files can be maintained by different developers.

I do not work on GNUStep and so do not have a horse in this race, but IMO the reasons you outlined are nothing short of horrible. You should be using forward declarations ("extern int foo; extern void bar(void);"), compiling your implementation files separately, and then letting ld(1) do its thing.

--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477





reply via email to

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