Skip to content

Commit

Permalink
[stdlib] Rename "Indexable" => "Container"
Browse files Browse the repository at this point in the history
Another step in the implementation of new Sequence protocols

Swift SVN r11958
  • Loading branch information
Dave Abrahams committed Jan 6, 2014
1 parent 942d3b0 commit a387a5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/StringDesign.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ of strings ``s1`` and ``s2``, “``s1 == s2``” yields the same result
regardless of system state. Strings *do* provide a suitable
foundation on which to build locale-aware interfaces.\ [#locales]_

Strings are **Indexable**
-------------------------
Strings are **Containers**
--------------------------

.. sidebar:: String Indices

``String`` implements the ``Indexable`` protocol, but
``String`` implements the ``Container`` protocol, but
**cannot be indexed by integers**. Instead,
``String.IndexType`` is a library type conforming to the
``BidirectionalIndex`` protocol.
Expand Down Expand Up @@ -784,7 +784,7 @@ Indexing
:Note: Swift may need additional interfaces to support
``index...`` and ``...index`` notations. This part of the
``Indexable`` protocol design isn't worked out yet.
``Container`` protocol design isn't worked out yet.

Comparison
~~~~~~~~~~~~
Expand Down Expand Up @@ -932,7 +932,7 @@ Searching
.. sidebar:: Naming

The Swift function is just an algorithm that comes from conformance
to the ``Indexable`` protocol, which explains why it doesn't have a
to the ``Container`` protocol, which explains why it doesn't have a
``String``\ -specific name.

:Swift:
Expand Down

0 comments on commit a387a5b

Please sign in to comment.