[c++-pthreads] C++ and posix threads

Matt Austern austern at apple.com
Mon Dec 22 22:23:32 UTC 2003


On Dec 22, 2003, at 2:18 PM, Mark Mitchell wrote:

> On Mon, 2003-12-22 at 13:57, Ted Baker wrote:
>>> (c) it is OK to consider slightly broader modifications to the 
>>> existing
>>> C interfaces for C++ (such as modifying "read()" to throw an 
>>> exception),
>>> but it should still be possible to recompile C programs as C++ 
>>> programs
>>> and get reasonable behavior.
>>
>> I don't think you will be able to get buy-in from vendors or
>> users of C if you require changes to the POSIX C libraries that
>> would change the behavior of any existing C application that
>> conforms to the current Open Group Unix or the IEEE POSIX
>> standards.
>
> I agree -- but I did not say that.  I said:
>
>   it is OK to consider slightly broader modifications to the
>   existing C interfaces for C++
>
> There's no inherent reason why a vendor would refuse to make a change 
> to
> the interfaces in some new mode -- so long as the
> backwards-compatibility requirement you mention were preserved.

And I think such modifications are almost inevitable.  POSIX defined a
binding for C.  It takes some thought to apply that binding to a 
different
language that has different mechanisms for abstraction, encapsulation,
and error reporting.

			--Matt




More information about the c++-pthreads mailing list