discuss-gnustep
[Top][All Lists]
Advanced

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

Re: #import is obsolete


From: Philippe C . D . Robert
Subject: Re: #import is obsolete
Date: Sat, 5 Jul 2003 11:43:37 +0200

Hi,

please do not let this become a flame again :-)

On Saturday, July 5, 2003, at 01:03 AM, Chris Hanson wrote:
On Friday, July 4, 2003, at 04:25  PM, Philippe C.D. Robert wrote:
#import is deprecated, instead #include should be used in conjunction with include guards. See previous threads about this topic.

The #import directive is *not* deprecated in Objective-C and you should *not* switch to #include with include guards; Apple owns the Objective-C language specification and I don't recall them ever saying any such thing.

Yes, there have been plenty of threads about this over the years. Unfortunately, the default build of GCC continues to not conform to the language standard and emit obsolete warnings.

Trying to insist the Mac OS X way of doing, well, anything with respect to Objective-C is broken or obsolete is a waste of time, at least until there's a formal vendor-neutral standards committee for Objective-C that decides to standardize on different behavior. Just conform with it already.

The #import directive is deprecated in FSF's GCC and will be removed in version 3.4. Hence if you plan to code for Cocoa as well as GNUstep then you'd rather not use #import. As a side note, #import is not an Objective-C language directive but a preprocessor directive.

Besides I'd love if there was a standards committee for Objective-C, even if it was mainly driven by Apple ... I believe it would be a good signal to the rest of the world if there was some more activity wrt Objective-C as a language, independent from Cocoa and GNUstep. Just like what M$ does with C#.

cheerio,

-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip





reply via email to

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