Commit Graph

14 Commits

Author SHA1 Message Date
Dave Abrahams
156020de19 [stdlib] Rename 'countElements' => 'count'
The name was not only long and unwieldy, but inconsistent with our
conscious decision to avoid the use of "elements" in APIs as mostly
redundant.

Swift SVN r22408
2014-09-30 22:00:26 +00:00
Dmitri Hrybenko
188f14ee9c stdlib: fix warning about extraneous '_'
Swift SVN r22066
2014-09-18 09:22:37 +00:00
Dave Abrahams
657e6a92eb [stdlib] doc-comment some protocols
handles: Interval.swift.gyb, Join.swift, OutputStream.swift

Swift SVN r22050
2014-09-18 00:08:51 +00:00
Dmitri Hrybenko
ddefab2bee stdlib: adjust the suggested default implementation to reserve the correct
amount of storage


Swift SVN r21004
2014-08-04 10:58:59 +00:00
Dave Abrahams
70b388ba77 [stdlib] Add append() to ExtensibleCollectionType
If you can be grown by an arbitrary sequence of your element type, you
can be grown by a single element.

Swift SVN r20996
2014-08-04 06:44:33 +00:00
Dave Abrahams
bd2bd78b23 [stdlib] Add RangeReplaceableCollectionType
Swift SVN r20791
2014-07-31 00:38:24 +00:00
Dmitri Hrybenko
190db64c18 stdlib: document current plan of record for reserveCapacity() semantics
rdar://16970908


Swift SVN r20758
2014-07-30 14:42:24 +00:00
Chris Lattner
e0b0205cd7 Remove the @assignment attribute entirely. It doesn't do anything except
enforce its own little constraints.  The type checker isn't using it for
anything, and it is just clutter.

This resolves <rdar://problem/16656024> Remove @assignment from operator implementations



Swift SVN r19960
2014-07-14 22:44:25 +00:00
Dave Abrahams
6d1095f44e Protocol names end in "Type," "ible," or "able"
Mechanically add "Type" to the end of any protocol names that don't end
in "Type," "ible," or "able."  Also, drop "Type" from the end of any
associated type names, except for those of the *LiteralConvertible
protocols.

There are obvious improvements to make in some of these names, which can
be handled with separate commits.

Fixes <rdar://problem/17165920> Protocols `Integer` etc should get
uglier names.

Swift SVN r19883
2014-07-12 17:29:57 +00:00
Jordan Rose
da29f099f0 Update stdlib for accessibility modifiers becoming context-sensitive keywords.
Swift SVN r19672
2014-07-08 02:17:46 +00:00
Jordan Rose
cca27d02a0 Tag everything in the standard library with accessibility attributes.
Keep calm: remember that the standard library has many more public exports
than the average target, and that this contains ALL of them at once.
I also deliberately tried to tag nearly every top-level decl, even if that
was just to explicitly mark things @internal, to make sure I didn't miss
something.

This does export more than we might want to, mostly for protocol conformance
reasons, along with our simple-but-limiting typealias rule. I tried to also
mark things private where possible, but it's really going to be up to the
standard library owners to get this right. This is also only validated
against top-level access control; I haven't fully tested against member-level
access control yet, and none of our semantic restrictions are in place.

Along the way I also noticed bits of stdlib cruft; to keep this patch
understandable, I didn't change any of them.

Swift SVN r19145
2014-06-24 21:32:18 +00:00
Dmitri Hrybenko
4693583767 stdlib/Join: fix an ambiguity in 'ExtensibleCollection + ExtensibleCollection'
Allows to use '+' on arrays.

rdar://16984439 rdar://16388632


Swift SVN r18488
2014-05-21 09:32:51 +00:00
Dmitri Hrybenko
652859f301 stdlib/Array: reduce duplication in ExtensibleCollection conformances
Swift SVN r18452
2014-05-20 12:45:03 +00:00
Dmitri Hrybenko
46790743be stdlib/Join: new: add a generic join() function that behaves like NSArray's
componentsJoinedByString:, or Python's join(), but is generic, operating on any
ExtensibleCollection

Part of rdar://16388632


Swift SVN r18450
2014-05-20 11:56:15 +00:00