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

Peter A. Buhr pabuhr at plg.uwaterloo.ca
Wed Oct 19 16:02:51 BST 2005


   Date: Fri, 14 Oct 2005 19:31:26 -0400
   From: Doug Lea <dl at cs.oswego.edu>
   Reply-To: C++ threads standardisation <cpp-threads at decadentplace.org.uk>
   Sender: cpp-threads-bounces at decadentplace.org.uk

   Well, in Java we learned to cheat. JSR166 (concurrency), JSR51(nio),
   and others changed the language by defining operations that cannot
   be explained in terms of other language features (nothing exotic, just
   things like CAS and park/unpark (primitive thread-blocking)) which
   forces JVMs to specially recognize ordinary-looking method calls to
   implement as "intrinsics". I think the same kind of cheating applies
   here. In this case the difference between syntax and library amounts
   to how pretty you'd like user code to be. We'd all like it as pretty as
   it can be, but for stuff like atomics with a high geek-factor anyway,
   it's not a high priority. For other aspects, there might be a
   stronger case.

I agree on the geek-stuff. Any syntax for this stuff is sufficient because the
people that use it can figure it out, regardless. But for regular programmers,
syntax becomes much more important. In the Java case and I believe in the C++
case, some new syntax was/is necessary.

Now my feeling about changing syntax has always been to put on my
compiler-writers hat and ask how hard is it to parse and understand this new
syntax. In a LOT of case, it is just as easy to parse and analyse the good
syntax as the not-so-good syntax. I think this should be the criteria for
deciding the exact form for new syntax. If the compiler people say the amount
of work is the same for either approach, than let's do it right.



More information about the cpp-threads mailing list