[cpp-threads] C++ committee meeting in Mont Tremblant

Boehm, Hans hans.boehm at hp.com
Fri Oct 21 21:57:46 BST 2005


> -----Original Message-----
> From: Peter A. Buhr
> ...
> Now you can invoke magic by saying the standard library has 
> to be started before any user code begins, and make the 
> thread-library part of the standard library. However, this 
> does not address how startup occurs *within* the standard 
> library; it simply puts the "witchcraft" boundary between the 
> standard library and the user code.
It also nakes all of the witchcraft the repsonsibility of the
compiler/OS vendor, who has more control over all the pieces than you
do.

> But what if a company 
> wants to develop and sell standard library replacement code? 
> One of the great features of C/C++ is that you can replace a 
> lot of the standard libraries to build interesting extensions 
> (like garbage collection in C/C++ ;-)
We already proposed to also make that the vendor's responsibility :-) :
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1833.pdf

But you are certainly correct that this is currently an issue.  (And I'm
unfortunately well aware of most of the problems you listed.)

> How do the programmers 
> in this domain ensure that initialization occurs in some 
> reasonable ordering?
I agree with you that this is far from ideal.  I'm just trying to limit
the problems we are trying to address, or at least decompose them into
smaller pieces, which I think gives us a better chance of getting
something into the standard.
> 
> I fully understand that booting an OS, an application, a 
> thread-library, may require some witchcraft. However, a 
> language should try to minimize the need for witchcraft or 
> push the witchcraft boundary back as far as possible. I have 
> not studied all the ramifications of this issue, but on the 
> surface other languages seem to tackle it by creating a 
> module mechanism. Is a module mechanism needed for C++? I 
> don't know. But I do know that getting uC++ started is very 
> difficult; it seems significantly more difficult than it 
> needs to be and the current code is very fragile. I want help 
> from the language to make it simpler. I'm sure other library 
> developers feel the same way.
There have been proposals for modules in C++, and the committee has been
paying attention to them.  But I'm not up on the details, or the extent
to which initialization issues have been addressed.  See:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1778.pdf

If someone wants to pursue this, that paper lists a bunch of
contributors, including Peter Dimov.

Hans



More information about the cpp-threads mailing list