discuss-gnustep
[Top][All Lists]
Advanced

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

Re: import vs include Re: Porting autogsdoc to OSX


From: Pascal Bourguignon
Subject: Re: import vs include Re: Porting autogsdoc to OSX
Date: Wed, 27 Feb 2002 20:28:35 +0100 (CET)



> From: Helge Hess <address@hidden>
> Date: Wed, 27 Feb 2002 18:10:07 +0100
> 
> Nicola Pero wrote:
> >>Exactly. Just as a side note, Lars Sonchocky-Helldorf filed the request 
> >>for "safe-guarding" OS X Foundation/Cocoa Headers against multiple 
> >>#includes as an Apple Bug with radar ID  #2868753. Today, just one day 
> >>later (!), the ticket has been closed.
> >>
> >>State: Verify
> >>Resolution: Behaves Correctly
> > 
> > You can always file the bug again if you disagree with them.
> > 
> > I always thought that a company (Apple) quarrelling with his customers
> > (Lars, you etc) - like in this case - is a very silly company.
> 
> There are some million more customers Apple needs to care about ... I 
> wonder whether Omni's frameworks have safeguarded headers and whether 
> they use #import (I'm pretty sure they do).
> 
> > I frankly don't understand why they can't protect the headers against
> > multiple #includes.  That way, they would just make more users happy (both
> > the ones who want to use #import, and the ones who want to use #include),
> > and they would loose nothing.
> 
> They would make the ten GNUstep developers more happy, their real 
> customers do not care at all and go on using #import as the 
> documentation suggests.
> Further they would need to modify about half of their code files, which 
> from a managers point of view very likely breaks something. Not to 
> mention existing documentation materials.
> 
> There is no point in stating "#import is deprecated" if the major ObjC 
> developer base uses (and always used) #import on a day-by-day basis. I 
> completly agree with you that it's a non-issue to safe guard header 
> files. I completly disagree with you that using #import is an issue.
> 
> Personally I safeguard all my header files and I always use #import for 
> Foundation and AppKit. This way I'm safe in every direction.
> I'm pretty sure that's the only option which makes sense for tools like 
> gs-autodoc or gsweb or GNUmail which are supposed to work on MacOSX.

Right, GNUstep developers and  users are stuck between gcc developpers
who have deprecated #import and  Apple (ex. NeXT) who will continue to
use it for the previsible future.

In these conditions, and given  that #import still works with gcc, the
only sensible thing we can do is:

   - continue to use #import to import Objective-C interfaces.

   - always  add  preventive  #ifndef/#define/#endif in  prevision  of
     possible obsolecense of #import.

   - keep at hand a simple script such as:
       for f in *.[hm] ; do 
          cp $f $f~ && sed -e 's/#import/#include/' <$f~ >$f
       done

In  consequence, I  would suggest  to have  the -Wno-import  option by
default in GNUstep makefiles.


-- 
__Pascal_Bourguignon__              (o_ Software patents are endangering
()  ASCII ribbon against html email //\ the computer industry all around
/\  and Microsoft attachments.      V_/ the world http://lpf.ai.mit.edu/
1962:DO20I=1.100  2001:my($f)=`fortune`;  http://petition.eurolinux.org/

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d? s++:++(+++)>++ a C+++  UB+++L++++$S+X++++>$ P- L+++ E++ W++
N++ o-- K- w------ O- M++$ V PS+E++ Y++ PGP++ t+ 5? X+ R !tv b++(+)
DI+++ D++ G++ e+++ h+(++) r? y---? UF++++
------END GEEK CODE BLOCK------





reply via email to

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