From -7282059927632794225
X-Google-Thread: f78e5,b53358bee20fa31
X-Google-Attributes: gidf78e5,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: francis.glassborow@btinternet.com (Francis Glassborow)
Newsgroups: comp.std.c++
Subject: Re: Proposal for ISO C/C++: Extensions for Portable Compilation and
   Linkage
Date: Wed, 12 Dec 2007 18:51:39 GMT
Lines: 83
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <WcSdnS3JB5VyWsLanZ2dnUVZ8sDinZ2d@bt.com>
References: <fjkjpg$7d6$1@aioe.org> <fjlbe4$r99$01$1@news.t-online.com> <fjmb5j$mpi$1@aioe.org> <fjmi8c$10v$03$1@news.t-online.com> <fjmrrf$8o8$1@aioe.org> <fjnt4l$kni$02$1@news.t-online.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1197485504 24323 158.152.254.254 (12 Dec 2007 18:51:44 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 12 Dec 2007 18:51:44 +0000 (UTC)
X-Original-To: std-c++@mailman.ucar.edu
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
X-Virus-Scanned: amavisd-new at ucar.edu
X-Usenet-Provider: http://www.giganews.com
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Received: (from fjh@localhost)
	by mulga.csse.unimelb.edu.au (8.13.8+Sun/8.13.8/Submit) id lBCIpdrI001411;
	Thu, 13 Dec 2007 05:51:39 +1100 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-NNTP-Posting-Date: Wed, 12 Dec 2007 05:37:19 -0600
X-Delivered-To: std-c++@mailman.ucar.edu
X-Authentication-Warning: serv1.gc.ams.giganews.com: news set sender to poster@giganews.com using -f
X-DMCA-Complaints-To: abuse@btinternet.com
X-AuthenticatedUsername: NoAuthUser
X-Postfilter: 1.3.36
X-SMTP-Auth: no
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:9803

Andre Kaufmann wrote:
> Michael Aaron Safyan wrote:
>> Andre Kaufmann wrote:
>>> Michael Aaron Safyan wrote:
>>>> [...]
>>>> 1.) Objective-C uses "#import", so this would break Objective-C and 
>>>> Objective-C++.
>>>
>>> Keeping both C and C++ in sync would restrict and delay the evolution 
>>> of C++ IMHO too much, too much discussions on both sides ;-).
>>
>> The majority of the Apple code base is implemented in Objective-C, and 
>> Objective-C++ is a big deal for development on OS X. Breaking 
>> Objective-C and Objective-C++ in this way, where it could be easily 
>> avoided (simply by selecting an alternative word), would -- I suspect 
>> -- greatly displease the people at Apple as well as all corporations 
>> which have developed applications for the Mac.
> 
> I didn't speak of breaking but of keeping in sync. If you introduce 
> another keyword in C++ and wait till it's specified in C also you will 
> wait a long time.
> 
>>>
>> [...]
>> 1.) Libraries may vary from version to version. For example, "libxml" 
>> may add functions in one version which are not available in previous 
>> versions, or it may even remove "deprecated" functions from newer 
>> versions.
> 
> Yes. Then it won't run, since it can't bind dynamically to the dll on 
> runtime. That's a general problem.
> 
>> 2.) Libraries may vary from installation to installation. For example, 
>> the presence of "WxWidgets" depends largely on whether the user has 
>> downloaded and installed "WxWidgets" and not upon the operating system.
>>
>>
>> The presence of libraries and header files depends on more than just 
>> the computer's operating system. It is already possible to detect the 
>> target machine's operating system with, albeit non-standard, 
>> predefined macros. However, since libraries and headers depend on the 
>> local configuration, this is not sufficient.
> 
> May be, but by detecting
> 
> if exist <windows.h>
> 
> you don't know which platform of Windows you want to compile to either.
> Win98, Win2000, Win2003, Windows CE, Win32, Win64 ?
> You additionally would need macros too.
> 
> 
>>>
>>> a) Testing for the existence of different libraries needs time.
>>>    Especially if you use your "exists" proposal in a header file,
>>>    which is included multiple times
>>
>> 1.) This testing is already done with the GNU Autotools.
> 
> Yes, as a kind of preprocessing.
> 
>> 2.) This testing would take less time than with the GNU Autotools, 
>> because there is a tendency to perform unnecessary tests in the event 
>> that a header file may later become necessary.
> 
> But would take more time as macros if the header file is used multiple 
> times. Here we have the basic problem of C++, get rid of that nasty 
> header files. They aren't worth it and I'm tired of dealing with 
> precompiled header files.
> 

Well they will not go away entirely (not least because of the need to 
maintain legacy code, but the modules proposal that has been put off for 
a TR (we did not have the resources to deal with it as part of the 
current revision of C++) will largely remove the need to use them for 
application level programmers.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



