[cpp-threads] RE: Initial comments on your straw man
Nick Maclaren
nmm1 at cus.cam.ac.uk
Fri Feb 24 20:30:16 GMT 2006
"Boehm, Hans" <hans.boehm at hp.com> wrote:
>
> f(&i) + f(&i) -- yes, otherwise lots of stuff is broken
>
> I really don't see how you can outlaw the third case and be left with a
> reasonable programming language. If I understand correctly, you would
> have to be able to see through all sorts of abstraction boundaries to
> know whether it is legal to use two function calls in the same
> xpression.
Not at all - it's trivial. All you have to do is to demand that the
language is purely functional :-)
Seriously. You can also do it in a non-functional language; Fortran
permits two function calls to be executed in parallel, as it defines
that any clash of side-effects is undefined behaviour. To achieve
what C/C++/Algol 68 do, you must use subroutines in Fortran.
As far as C++ goes - don't try to get there from here.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the cpp-threads
mailing list