discuss-gnustep
[Top][All Lists]
Advanced

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

[OT] Re: import


From: Pascal Bourguignon
Subject: [OT] Re: import
Date: Fri, 21 Dec 2001 20:41:00 +0100 (CET)


> > #import is deprecated - on technical grounds - by any gcc compiler hacker
> > we had the chance of talking to, both GNU and Apple folks - they have
> > strong views on that point and they keep the warning turned on in the
> > compiler by default.
> >
> 
> As a complete ObjC newbie -
> *why* is it deprecated?   Does #import  work anything like the Java import, 
> which automagically takes care of namespace merging and stuff that in C 
> results in that stupid, annoying, kludgy system of #include+#ifdef XXX_YYY_H ?
> 
> If ObjC #import works like Java import, surely it's a massive and stupid  
> step backwards to use #include +#ifdefs instead of #import ?
> 
> OTOH if it's just a synonym for #include, then fair enough...

It's just a nice feature instead of the kludgy #include+#ifndef+#define.

But these C compiler hackers prefer  it this way, and add hidden magic
in they  compiler to do  exactly the same  thing than #import  when it
sees the #include+#ifndef+#define incantation.

I think  they're wrong, because I  prefer to write  programs in higher
level languages,  with an interface  file and an  implementation file,
and there's  no need to  play games with "headers"  "included" several
times with various different "macro" definitions...


-- 
__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]