Sunday, December 9, 2018

Digest for comp.lang.c++@googlegroups.com - 11 updates in 4 topics

David Brown <david.brown@hesbynett.no>: Dec 09 01:27PM +0100

> deprecated, then undeprecated and then deprecated again.
> I'm not sure what to expect regarding #import, but I
> wouldn't be surprised if it is reinstated.
 
I have no idea where you get your information.
 
#import is a standard directive in Objective-C. At the time gcc
introduced support for Objective-C, they had an attitude of being very
flexible about adding extensions - they added a good many extensions to
C, and supported a range of features from one language or standard
across the other related languages and standards.
 
Since then, they have realised that this policy was not good in the long
term, and have been far more conservative about adding non-standard
features. The gcc team now prefer to push for getting the features they
want into the C++ (and, to a lesser extent, C) standards.
 
So #import is deprecated as a poor idea for C and C++. There is /zero/
chance of it ever being undeprecated - no rationale C++ developer would
think it is a good plan to have #import when /real/ modules are on the
horizon as an alternative to #include.
Juha Nieminen <nospam@thanks.invalid>: Dec 09 07:04PM

> include guards are standard, will work correctly in awkward cases (such
> as accessing the same file from different filesystem paths), will work
> correctly no matter how the file is included
 
Actually no. The "standard" way of using include guards (ie. the
archetypal "#ifdef/#define" at the beginning of the header file,
and the "

No comments: