<html>
<head>
<title>C++0x Standard Library wishlist</title>
</head>

<body
<font face="Arial, Helvetica, sans-serif">

<pre>
Doc. no.: N1732=04-0172
Date:     5 Nov 2004
Project:  Programming Language C++
Reply to: Matt Austern &lt;austern@apple.com>
</pre>


<h1>C++0x Standard Library wishlist (revision 2)</h1>

<p>This is a list of suggested additions to the standard C++ library
  for the next version of C++ ("C++0x").</p>

<p>This list is intended as a stimulus to further work.  Some of the
  items on this list already have one or more concrete proposals
  associated with them, others are vague hopes, and most are
  somewhere in between.  Similarly, the scope of these items extend
  from minor changes in an existing interface to major research projects.
</p>

<p>I have listed a name or names for each item, and, if relevant, I
  have listed a paper or papers describing the idea.  These ideas
  are not necessarily supported by anyone other than the person
  who suggested them, and you should not assume that any particular
  item will make it into C++0x.  The items in this list are in no
  particular order.</p>

<p>

<h2>Categories</h2>

<p>Most of the entries in the wish list fall into a small number of
  general categories:</p>
<ul>
<li><b>System</b>: Things that can't be done portably in standard C++, such as
  filesystem access, sockets, database access, and persistence.</li>
<li><b>Numerics</b>: Numerical computation</li>
<li><b>Usability</b>: Usability improvements, particularly for novices.</li>
<li><b>Algorithms</b>: Algorithms and data structures</li>
</ul>

<!-- -------------------------------------------------- -->
<h2>The wish list</h2>

<hr />
<h3>Formatted container output</h3>
<p>
<b>Requester:</b> Dave Abrahams
<br />
<b>Paper: </b>
</p>
<p>Simple and uniform display mechanism for arbitrary ordered lists.
(Arrays, STL containers, pairs, tuples, etc.)  cout &lt;&lt; x should
"just work" for such types.</p>

<hr />
<h3>Infinite-precision integer arithmetic</h3>
<p>
<b>Requester:</b> Maarten Kronenburg, Bjarne Stroustrup, Matt
Austern, others 
<br />
<b>Paper:</b> N1718, "A Proposal to add the Infinite Precision
Integer and Rational to the C++ Standard Library", M. J. Kronenburg.
</p>

<hr />
<h3>Uniform use of std::string</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
String versions of all (or) most functions that take C-style
strings (e.g.  filestream constructors)
</p>

<hr />
<h3>Simple numeric access</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
Simple functions for extracting int and floating-point values out
of a string
</p>


<hr />
<h3>Threads</h3>
<p>
<b>Requester:</b> Bill Kempf, Bjarne Stroustrup, Andrei Alexandrescu, others
<br />
<b>Paper: </b>
</p>
<p>
</p>

<hr />
<h3>Sockets</h3>
<p>
<b>Requester:</b>Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
</p>

<hr />
<h3>Explicit support for Unicode</h3>
<p>
<b>Requester:</b> Matt Austern
<br />
<b>Paper: </b>
</p>
<p>
</p>

<hr />
<h3>An XML parser and generator library</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
</p>

<hr />
<h3>Constructive reals</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup, Hans Boehm
<br />
<b>Paper: </b>
</p>
<p>
"Infinite precision" reals.
</p>

<hr />
<h3>GUI</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
Some form of simple graphic/GUI library (possibly a simple
interface to the simpler parts of larger libraries)&mdash;a recurent
theme.
</p>

<hr />
<h3>Random access to files</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
a facility for random-access to files; maybe a form of random-access 
iterators for filestreams
</p>

<hr />
<h3>Safe STL</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup
<br />
<b>Paper: </b>
</p>
<p>
a range checked version of standard containers/iterators and
algorithms
</p>

<hr />
<h3>Filesystem access</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup, Beman Dawes
<br />
<b>Paper: </b>
</p>
<p>
a way of manipulating files that are part of a directory structure
</p>

<hr />
<h3>Linear algebra</h3>
<p>
<b>Requester:</b> Bjarne Stroustrup, Tanguy Fautr&eacute;
<br />
<b>Paper: </b>
</p>
<p>
a good linear algebra library (Matrices and vectors)
</p>

<hr />
<h3>Virtual destructors for containers</h3>
<p>
<b>Requester:</b> David Miller
<br />
<b>Paper: </b>
</p>
<p>
Versions of the standard containers with virtual destructors
</p>

<hr />
<h3>Move semantics</h3>
<p>
<b>Requester:</b> Howard Hinnant
<br />
<b>Paper: </b>
</p>
<p>
Move semantics, which requires core and library support
</p>

<hr />
<h3>String formatting</h3>
<p>
<b>Requester:</b> Gary Powell
<br />
<b>Paper: </b>
</p>
<p>
A string formatting library. (Aka, type safe printf) John Bates
suggests that one way to improve on printf would be to
have <i>explicit</i> parameter substitution via numbering, as opposed
to the implicit ordering in printf.  This would be similar to Java's
MessageFormat object or Microsoft's FormatMessage API and would allow
better internationalization support.
</p>

<hr />
<h3>Runtime generic container</h3>
<p>
<b>Requester:</b> Gary Powell
<br />
<b>Paper: </b>
</p>
<p>
A container to hold anything, like dynamic_any
</p>

<hr />
<h3>Date and time</h3>
<p>
<b>Requester:</b> Gary Powell
<br />
<b>Paper: </b>
</p>
<p>
A date/time library, a date is not a duration! And an end to time_t.
</p>

<hr />
<h3>Graph algorithms</h3>
<p>
<b>Requester:</b> Gary Powell
<br />
<b>Paper: </b>
</p>
<p>
a graph library, aka boost/graph (supplements std containers)
</p>

<hr />
<h3>Quaternions and octonions</h3>
<p>
<b>Requester:</b> Gary Powell
<br />
<b>Paper: </b>
</p>
<p>
math/octonion & math/quaterion's (used by game designers for 3d math.)
</p>

<hr />
<h3>Units</h3>
<p>
<b>Requester:</b> Gary Powell, Walter Brown
<br />
<b>Paper: </b>
</p>
<p>
a SI/Units library. ( e = m c<sup>2</sup>, and end to the mars lander
    crashes.)
</p>

<hr />
<h3>More STL algorithms</h3>
<p>
<b>Requester:</b> Matt Austern
<br />
<b>Paper: </b>
</p>
<p>
New STL algorithms: copy_if, is_sorted, versions of the
uninitialized_* algorithms that take allocator arguments.
</p>

<hr />
<h3>Web services</h3>
<p>
<b>Requester:</b> Jonathan Schilling
<br />
<b>Paper: </b>
</p>
<p>
A SOAP- and XML-based web services binding to the standard
library.  There would also need to be some kind of
metalanguage/directives mechanism for marking within the C++
source, which classes and functions are being exposed as web
services.
</p>

<hr />
<h3>More special functions</h3>
<p>
<b>Requester:</b> Paul Bristow
<br />
<b>Paper: </b> N1668 = 04-0108, "A Proposal to add Mathematical
Functions for Statistics to the C++ Standard Library", Paul Bristow
</p>
<p>
More math functions for statistics: Student's <i>t</i> function,
Kolmogorov statistic, incomplete beta function, digamma function, and
so on.
</p>

<hr />
<h3>Full-width integer operations</h3>
<p>
<b>Requester:</b> Matt Austern
<br />
<b>Paper: </b>
</p>
<p>
  A mechanism for accessing integer operations that every processor
  has: addition with carry, full-width multiplication, and division
  with remainder and quotient.  The signatures might look something
  like this: <tt>pair&lt;UInt, bool&gt; add(UInt, UInt);</tt>,
  <tt>pair&lt;UInt, UInt&gt; mult(UInt, UInt);</tt>,
  <tt>pair&lt;UInt, UInt&gt; div(UInt, UInt);</tt>.  We would 
  probably want overloads for <tt>unsigned int</tt>,
  <tt>unsigned long</tt>, <tt>unsigned long long</tt> (assuming it's
  added to the core language), and maybe <tt>unsigned char</tt>.</td>
</p>

<hr />
<h3>Database support</h3>
<p>
<b>Requester:</b> R&uuml;diger Br&uuml;nner
<br>
<b>Paper: </b>
</p>
<p>
Generic database support; STL-based recordset operations
</p>

<hr />
<h3>Serialization</h3>
<p>
<b>Requester:</b> R&uuml;diger Br&uuml;nner
<br>
<b>Paper: </b>
</p>
<p>
Library for binary object serialization/deserialization including
object factory, versioning support, support for native datatypes and
Standard Library classes (std::basic_string, STL containers,
std::complex, etc.) 
</p>

<hr />
<h3>Fixed-point arithmetic</h3>
<p>
<b>Requester:</b> R&uuml;diger Br&uuml;nner
<br>
<b>Paper: </b>
</p>
<p>
Fixed-point arithmetic library and currency class based upon it
</p>

<hr />
<h3>Patterns</h3>
<p>
<b>Requester:</b> R&uuml;diger Br&uuml;nner
<br>
<b>Paper: </b>
</p>
<p>
Singleton template (like in the Loki library) and probably
also generic implementations of other common patterns 
</p>

<hr />
<h3>Interval arithmetic</h3>
<p>
<b>Requester:</b> Sylvain Pion
<br>
<b>Paper: </b>
</p>
<p>
The Sun compiler provides a built-in type for interval arithmetic, and
Boost and CGAL have interval classes.  There are many other
implementations elsewhere.
</p>



<!-- -------------------------------------------------- -->

<hr />
<p>
Please sent additions to this list to
<a href="http://lafstern.org/matt/">Matt Austern</a>,
<tt>austern @ apple.com</tt>
</p>

</font>
</body>
