Skip to content

Commit 49d4893

Browse files
Remove BooleanType from docs/StdlibRationales.rst
1 parent 9defc0a commit 49d4893

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

docs/StdlibRationales.rst

-15
Original file line numberDiff line numberDiff line change
@@ -174,21 +174,6 @@ call an API with a different name, say ``lazyEnumerate()`` to opt into
174174
laziness. The problem is that the eager API, which would have a shorter and
175175
less obscure name, would be less efficient for the common case.
176176

177-
Use of ``BooleanType`` in library APIs
178-
--------------------------------------
179-
180-
Use ``Bool`` instead of a generic function over a ``BooleanType``, unless there
181-
are special circumstances (for example, ``func &&`` is designed to work on all
182-
boolean values so that ``&&`` feels like a part of the language).
183-
184-
``BooleanType`` is a protocol to which only ``Bool`` and ``ObjCBool`` conform.
185-
Users don't usually interact ``ObjCBool`` instances, except when using certain
186-
specific APIs (for example, APIs that operate on pointers to ``BOOL``). If
187-
someone already has an ``ObjCBool`` instance for whatever strange reason, they
188-
can just convert it to ``Bool``. We think this is the right tradeoff:
189-
simplifying function signatures is more important than making a marginal
190-
usecase a bit more convenient.
191-
192177
Possible future directions
193178
==========================
194179

0 commit comments

Comments
 (0)