|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54208 - sandbox/committee/LWG/proposals
From: dave_at_[hidden]
Date: 2009-06-22 08:49:10
Author: dave
Date: 2009-06-22 08:49:09 EDT (Mon, 22 Jun 2009)
New Revision: 54208
URL: http://svn.boost.org/trac/boost/changeset/54208
Log:
Reference the other paper; strengthen a few arguments.
Text files modified:
sandbox/committee/LWG/proposals/Intentional | 49 +++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 20 deletions(-)
Modified: sandbox/committee/LWG/proposals/Intentional Concept Mapping.html
==============================================================================
--- sandbox/committee/LWG/proposals/Intentional Concept Mapping.html (original)
+++ sandbox/committee/LWG/proposals/Intentional Concept Mapping.html 2009-06-22 08:49:09 EDT (Mon, 22 Jun 2009)
@@ -75,10 +75,11 @@
self-documentation, particularly for large classes, negating some of the
value as documentation for users and maintainers.</li>
- <li>The location of the concept maps after the class definition tends to
- tends to push the important activity of constraining the class until
- later in the class' development cycle, but it best occurs early (probably
- first).</li>
+ <li>The location of the concept maps after the class definition
+ tends to tends to push the important activity of constraining the
+ class in code until later in its development cycle, even though
+ such concept maps are best written early (usually before the body
+ of the class is filled in).</li>
<li>Empty concept maps are excessively verbose.</li>
</ul>
@@ -95,14 +96,20 @@
<h2>Syntax</h2>
- <p>The proposed wording uses <code>-></code> as a syntax marker for the
- beginning of the list of concepts to be mapped. The authors are not wedded
- to <code>-></code>, and considered several alternate keyword and
- punctuation possibilities.</p>
-
- <p>We did consider using <code>requires</code>, but it was rejected on the
- grounds that it would make a <code>concept_map</code> look too much like a
- requires clause in a region of code where either could appear, but a
+ <p>The proposed wording uses <code>-></code> as a syntax marker
+ for the beginning of the list of concepts to be mapped. The authors
+ considered several alternate keyword and punctuation possibilities
+ and are not wedded to the use of <code>-></code>. We welcome
+ syntax suggestions from the committee (keeping in mind the usual
+ "bicycle shed" caveat, of course!)</p>
+
+ <p>We describe here our rationale for rejecting the use
+ of <code>requires</code> as a marker only because we consider the
+ argument sufficiently subtle to be a potential time-waster for the
+ committee. The problem is that using <code>requires</code> makes
+ a <code>concept_map</code> look too much like a
+ <code>requires</code> clause in a region of code where either one
+ could appear. A
<code>concept_map</code> is fundamentally different from a
<code>requires</code> clause. When you write:</p>
<blockquote>
@@ -132,11 +139,8 @@
template <typename T>
concept_map EqualityComparable<Y<T> > { };
</pre>
-
</blockquote>
- <p>We welcome syntax suggestions from the committee.</p>
-
<h2>Motivation</h2>
<p>The critical motivation for this proposal is the desire to be able to
@@ -149,11 +153,16 @@
concept maps—even empty ones—as meeting critical
needs. We wish to make empty concept maps more convenient, more
expressive, and less verbose in the common case where one is
- intentionally creating a model of a known concept, however empty
- <code>concept_map</code>s will still be needed for post-hoc
- adaptation of types to concepts, an important function
+ intentionally creating a model of a known concept. Empty
+ <code>concept_map</code>s will still be needed in their current form
+ for nonintrusive post-hoc adaptation of types to concepts, an important function
of <code>concept_map</code>s in general.</p>
+ <p>Another important motivation for this proposal is that it
+ provides a powerful platform for the common case of exported concept
+ maps as proposed by N2918=09-0108, with
+ zero syntactic overhead.</p>
+
<h2>Proposed Wording</h2>
<p><i>Change 9 Classes [class] as indicated:</i></p>
@@ -223,7 +232,7 @@
<p>A <i>mapped-concept-clause</i> contains a list of concepts to map to.
A concept is "mapped to" for each <i>mapped-concept</i> as if by a
<code>concept_map</code>([concept.map]). The <code>concept_map</code>
- acts as if appears immediately after the class being defined, and is
+ acts as if it appears immediately after the class being defined, and is
equivalent to:</p>
<pre>concept_map <i>Concept</i><<i>Class</i>> {};
</pre>
@@ -255,4 +264,4 @@
Jerry Schwarz, in committee message c++std-lib-23459, suggested syntax that
mimics inheritance.</p>
</body>
-</html>
\ No newline at end of file
+</html>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk