[cpp-threads] C++ committee meeting in Mont Tremblant
Boehm, Hans
hans.boehm at hp.com
Wed Oct 19 21:36:59 BST 2005
Doesn't it make more sense to agree on functionality before syntax here?
I think there are a number of valid reasons to potentially go with a new
syntax:
1) The pseudo-library syntax for a common construct looks really ugly.
At the memory model/atomics level, this may happen with the use of
atomics for double-checked locking. But Peter doesn't think so, and I
don't think we can really tell before we know what the library version
looks like. (I did get some feedback that the placeholder syntax I used
in my slides was really ugly. But that demonstrates nothing.)
2) All implementations must recognize the "library" syntax in the
compiler anyway, and there is a nicer syntax. I think the first part of
this is less true for threading primitives than people often think. A
lot of them are implementable (with mild loss of performance) as a
library call, which is treated as opaque by the compiler. (Or they
would be if we had a real memory model.)
In both cases, I don't think we can make the decision in the abstract.
Hans
> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk
> [mailto:cpp-threads-bounces at decadentplace.org.uk] On Behalf
> Of Peter A. Buhr
> Sent: Wednesday, October 19, 2005 8:30 AM
> To: cpp-threads at decadentplace.org.uk
> Subject: Re: [cpp-threads] C++ committee meeting in Mont Tremblant
>
>
> There is one precedent in C++ too, in a way
> antagonistic/complementary
> to the example above. The typeof operator is built in, however it
> returns something that has no meaning unless you have included
> <typeinfo>, and which otherwise has regular class semantics.
>
> I agree that it is possible to combine new syntax with
> library features to effect an extension. I agree that some
> extensions can be done solely via a library approach. But I
> strongly believe that not all extensions can be accomplished
> without some syntactic changes to the language.
>
> In case anyone wants to look further at this case, there is a
> small typo: it's the "typeid" operator not "typeof". "typeof"
> is a gcc extension.
>
> --
> cpp-threads mailing list
> cpp-threads at decadentplace.org.uk
> http://www.decadentplace.org.uk/cgi-bin/mailman/listinfo/cpp-threads
>
More information about the cpp-threads
mailing list