Commit Graph

26 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
Dave Abrahams
8a886b5d07 [stdlib] Fix incomplete parameter rename
Swift SVN r22247
2014-09-24 00:43:15 +00:00
Dave Abrahams
42cef97f6b [stdlib] Misc protocol comment propagation
171 undocumented non-operator public APIs remain in core

Swift SVN r22246
2014-09-24 00:27:58 +00:00
Dave Abrahams
f4a7812065 [stdlib] Propagate SequenceType docs to models
235 undocumented public APIs remain in core

Swift SVN r22210
2014-09-23 10:40:37 +00:00
Dave Abrahams
76f9313088 [stdlib] Propagate GeneratorType docs to models
Swift SVN r22208
2014-09-23 09:47:26 +00:00
Dave Abrahams
1dd7272fe9 [stdlib] Propagate CollectionType docs to models
266 undocumented public APIs remain in core

Swift SVN r22206
2014-09-23 08:19:23 +00:00
Dave Abrahams
33bebac909 [stdlib] Boilerplate doc-comment wording change
Swift SVN r22042
2014-09-17 21:19:24 +00:00
Dave Abrahams
6a40e001e1 [stdlib] doc-comment collection protocols
Swift SVN r22028
2014-09-17 18:11:50 +00:00
Argyrios Kyrtzidis
c4ed48520b [stdlib] Replace unicode quotes with ascii ones.
It is currently beneficial when displaying the interface in Xcode if it is free from non-ascii characters.

Swift SVN r22000
2014-09-17 02:40:45 +00:00
Dave Abrahams
ed52a1063f [stdlib] doc-comment Collection.swift
Swift SVN r21987
2014-09-16 22:01:28 +00:00
Joe Pamer
94dac129d4 Remove the BooleanType conformance from optional types (rdar://problem/17110911)
To limit user confusion when using conditional expressions of type Bool?, we've decided to remove the BooleanType (aka "LogicValue") conformance from optional types. (If users would like to use an expression of type Bool? as a conditional, they'll need to check against nil.)

Note: This change effectively regresses the "case is" pattern over types, since it currently demands a BooleanType conformance. I've filed rdar://problem/17791533 to track reinstating it if necessary.

Swift SVN r20637
2014-07-28 19:20:39 +00:00
Dave Abrahams
1a6c80a93d [stdlib] .first and .last are var:T?, not func->T
The global first() and last() algorithms return T?, nil when empty

All .first() and .last() methods became T? vars that are nil when the
Collection is empty

Swift SVN r20326
2014-07-22 19:30:42 +00:00
Dave Abrahams
a1c1d09c6c [stdlib] Add first, last, and isEmpty algorithms
<rdar://problem/16953693> part 1 of 3

Swift SVN r20237
2014-07-21 03:27:15 +00:00
Dave Abrahams
a84f46ca26 [stdlib] Add prefix/suffix functions on Sliceable
Also, improve comments in Collection.swift

Swift SVN r20125
2014-07-18 00:11:44 +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
5e59d30c6f Update stdlib for memberwise access control.
As before, there may be more things marked @public than we actually want
public. Judicious use of the frontend option -disable-access-control may
help reduce the public surface area of the stdlib.

Swift SVN r19353
2014-06-30 18:50:50 +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
Ted Kremenek
58558fcca3 Rename 'succ' and 'pred' to 'successor' and 'predecessor' respectively.
This is motivated by <rdar://problem/17051606>.

This ends up renaming variables as well, which seems right for
consistency since we use "predicate" as variable name.

Swift SVN r19135
2014-06-24 19:27:19 +00:00
Chris Lattner
62cad3dce8 add a "..<" operator, which is an alias for ".." and switch the stdlib to use it.
Until I have a chance to update the testsuite, we'll accept both.



Swift SVN r18998
2014-06-19 05:42:29 +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
Dave Abrahams
13962588a9 [stdlib] add reverse(c), s/Reverse/ReverseView/g
Now reverse() is available as a peer to map() and filter()
Addresses <rdar://problem/15919204>

Swift SVN r18389
2014-05-19 04:30:16 +00:00
Dave Abrahams
e0d37be053 [stdlib] Rename (Indexed=>Permutation)Generator
It was too easily confused with IndexingGenerator, which, come to think
of it may be obsolete.  It's just a PermutationGenerator with
startIndex..endIndex in the indices sequence.

Swift SVN r18341
2014-05-18 19:03:26 +00:00
Ted Kremenek
9eea282719 Switch range operators ".." and "...".
- 1..3 now means 1,2
- 1...3 now means 1,2,3

Implements <rdar://problem/16839891>

Swift SVN r18066
2014-05-14 07:36:00 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Dave Abrahams
bf3ca81ee7 [stdlib] File renames associated with protocol name changes
Swift SVN r12063
2014-01-08 20:06:29 +00:00