From: John Max Skaller (skaller_at_[hidden])
Date: 2001-08-15 15:26:48
Beman Dawes wrote:
> Comments? Anyone like to try to put together a preliminary list of
There are two libraries that I think should be submitted
on their own: thread and tuple. These are probably the two most
important libraries. Thread is important, because it requires
a fundamental core language change. Tuple is important,
because it ought to be compiler supported, and is a fundamental
data structure which might change the approach to templates
When tuple is submitted, I'm likely to comment that
the semantics are probably too strong. In particular,
I don't think it should permit mutation. Tuples should be
_immutable_, and this is vital for two distinct reasons:
The optimisation argument is obvious I hope. Tuples cannot
be heavily used by libraries unless passing a tuple
is at least as potentially efficient as passing
individual arguments. This can only be the case
if the semantics are indistinguishable.
The meta-progamming argument is probably even more
important. There is a theoretical basis in functional
programming for tuples which is endangered by mutability.
In particular, the representation of tuples as lists
with sharing is ONLY possible if the tuples are immutable.
It's very unfortunate, but the silly comma operator
destroys a major simplification to C++ in which
we use tuples as arguments to functions (almost) universally,
such a change has a major impact on templates. Sigh.
C compatibility strikes again.
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk