• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: usage of #import?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: usage of #import?


  • Subject: Re: usage of #import?
  • From: Don Yacktman <email@hidden>
  • Date: Mon, 11 Nov 2002 14:43:19 -0700

On Sunday, November 10, 2002, at 03:30 AM, Philippe C.D. Robert wrote:
Hi Wilfredo,

I do not exactly know the official reasoning from the FSF against the usage of this feature, but as Stan points out in his email there are indeed some valid reasons for not using it in ObjC code (in some circumstances):

http://mail.gnu.org/pipermail/discuss-gnustep/2001-October/013735.html

In over 10 years of using Objective-C in a variety of different environments, I have never once seen any of these theoretical problems with #import actually happen even once. So in practice, for Objective-C at least, it is not a problem.

So my original question was more whether Apple will go and try to 'de-deprecate' it since they seem to have made their minds wrt using this feature and since they seem to work together with the FSF or not.

But then, all this is not that important, I was just curious...:-)

At any rate, I can't speak for Apple, but as far as I can tell Apple intends to keep using #import and that won't change any time soon. It would be a lot of work to fix something that while theoretically could cause minor annoyances, in practice almost never happens. (And even if it did happen, it would be pretty easy to fix, once you knew what was going on.) So I don't see the cost benefit equation resolving into any action other than maintaining the status quo.

-Phil

PS: And yes, Don, I am also around since NeXT days and I know about the long history this feature has. Call me pedantic, but just saying 'Stallman is wrong, end of story' does not solve the issue because strictly speaking Apple uses the FSF compiler and thus stays in conflict with the official guidelines. As even mentioned in the man pages coming with Mac OS X (-W{no-}import)..:-)

Well, that was, to some degree, a weak attempt at humor. I'm not really that dogmatic. I do agree that #import can be problematic in some situations. I just turns out to not be a significant problem in practice. Then again, I'd never use #import for straight C headers. The reason is that #import is a part of Objective-C specifically and isn't a part of C, so using it with C code would be IMHO quite inadvisable, since it does subtly change the semantics of header inclusion in ways that might not make sense for C code.

--
Later,
Don Yacktman
illumineX, inc.
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: usage of #import?
      • From: Keith Ray <email@hidden>
References: 
 >Re: usage of #import? (From: "Philippe C.D. Robert" <email@hidden>)

  • Prev by Date: Re: Save tiff with no alpha
  • Next by Date: Re: Annoying warning: statement with no effect
  • Previous by thread: Re: usage of #import?
  • Next by thread: Re: usage of #import?
  • Index(es):
    • Date
    • Thread