practicalswift
797b80765f
[gardening] Use the correct base URL ( https://swift.org ) in references to the Swift website
...
Remove all references to the old non-TLS enabled base URL (http://swift.org )
2016-11-20 17:36:03 +01:00
Nicholas Maccharoli
5bb7baab7f
[stdlib] simplify loop logic
2016-09-01 17:58:46 +09:00
Nate Cook
559092bbf2
[stdlib] Revise stdlib documentation comments
...
- Expand pre-example explanations
- Update documentation for SE-0118
- Removing remaining 'iff' usage
- Revise Array discussion
- Fix formIndex(_:offsetBy) parameter formatting
- Improve index/formIndex(_:offsetBy:(limitedBy:)?) discussion
- Update Quick Look discussions
- Fixes grammar inconsistencies
- Adds parameter / return documentation
- Adds and expands on examples
- Revises AnyObject discussion for new `id` bridging rules
- Revise readLine, print, and assertion functions
- Add missing docs to String index-moving methods
2016-08-05 16:07:46 -05:00
Jacob Bandes-Storch
a0bf9b8e71
[stdlib] Update doc comments for SE-0133
2016-07-28 15:58:50 -07:00
Jay Buffington
f17d9a8d67
Stdlib doc fixes ( #3684 )
...
* [stdlib] Correct documentation for joined (join -> joined)
* [stdlib] Correct example in documentation for Unmanaged.toOpaque
Fixes <https://bugs.swift.org/browse/SR-1911 >.
2016-07-23 00:00:41 -05:00
Dmitri Gribenko
824bccc871
stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types
2016-07-11 10:54:43 -07:00
Rintaro Ishizaki
6ef62f3c73
[stdlib] Better diagnosis for unavailable APIs
...
Added tests for expected-error and fix-its.
- Add arguments signature regardless that is the same as before.
Because the error message looks more natural.
e.g. "makeIterator" => "makeIterator()",
"replaceSubrange" => "replaceSubrange(_:with:)"
- Any${ExistentialCollection}.underestimateCount() was a method, not
computed property.
- 'LazySequenceType' has been renamed to 'LazySequenceProtocol', but not
'LazyCollectionProtocol'
- Streamable.writeTo(_:) had no argument label.
- Fixed typo in print() debugPrint() error message (not working for now)
- Repeated.init(): changed `renamed` to `message` because the arugment
order has changed.
- Marked `public` for some unavailable method on `Sequence`
- Sequence.split(_:maxSplit:allowEmptySlices) was replaced with
split(separator:maxSplits:omittingEmptySubsequences:),
not split(separator:omittingEmptySubsequences:isSeparator:)
- Sequence.split(_:allowEmptySlices:isSeparator) was replaced with
split(maxSplits:omittingEmptySubsequences:isSeparator:),
not split(_:omittingEmptySubsequences:isSeparator:)
- Sequence.startsWith(_:isEquivalent:) or startsWith(_:) had no label on
the first argument.
- transcode(_:_:_:_:stopOnError), not transcode(_:_:_:_:stoppingOnError)
- Removed mutating methods from UnsafePointer.
alloc(_:), dealloc(_:), setter:memory, initialize(_:), destroy(),
and destroy(_:)
2016-07-01 14:52:09 +09:00
Rintaro Ishizaki
d83dedd856
[stdlib] Better fixit
...
removeAtIndex(_:) => remove(at:)
joinedWithSeparator(_:) => joined(separator:)
2016-06-15 22:12:47 +09:00
Rintaro Ishizaki
668b9dbc64
[stdlib] Apply tail style "where" clause to stdlib/public/core
2016-06-02 12:00:55 +09:00
Patrick Pijnappel
daec2dae00
Resolve conflicts with master
2016-05-24 19:21:04 +02:00
Dmitri Gribenko
d591f9cf7a
stdlib: remove most uses of @warn_unused_result, which does nothing now
...
I kept the one on sorted(), because that one requires a less trivial
change.
2016-05-19 18:39:39 -07:00
Patrick Pijnappel
4419614be4
Move post-nil guarantee to separate line for Iterators' next()
2016-05-08 21:36:39 +02:00
Patrick Pijnappel
ab9e74cba3
Resolve conflicts with upstream
2016-05-05 08:55:34 +02:00
Mark Lacey
e03d334b68
Use Builtin.unreachable() in unavailable functions.
...
Saves a bit of code size in the standard library by eliminating some
static strings and function calls.
rdar://problem/25767016
2016-05-02 21:30:25 -07:00
Nate Cook
6e274913bf
[stdlib] Revise documentation for Array- and Set-related types.
...
This adds and expands documentation for sequences, collections, and the array
types as well as `Set` and its related protocols.
2016-04-25 12:54:39 -05:00
Manav Gabhawala
7928140f79
[SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary
2016-04-06 20:21:58 -04:00
Dmitri Gribenko
999aceb682
stdlib: correct fixits for 'func generator()'
...
rdar://problem/25492963
2016-04-01 10:48:48 -07:00
Patrick Pijnappel
07a8c39fcb
[stdlib] Use double space as sentence separator in IteratorType.next() docs.
2016-03-16 22:36:26 +11:00
Patrick Pijnappel
020841d4ba
[stdlib] Add post-nil guarantee for IteratorProtocol.next() to always return nil
2016-03-16 22:06:07 +11:00
Daniel Duan
276370b599
[stdlib] apply SE-0040 to stdlib
2016-03-11 16:01:41 -08:00
Max Moiseev
7fe6916bf6
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-03-07 12:10:47 -08:00
Hugh Bellamy
c1b25bb32f
[gardening] Remove double new lines from stdlib files
2016-03-05 15:44:54 +00:00
Jordan Rose
b319e3da32
stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
...
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
Dmitri Gribenko
f0633ce5a9
stdlib: Sequence.iterator() => .makeIterator()
2016-02-23 13:52:30 -08:00
Max Moiseev
4b9eab6288
appendContentsOf => appendContents(of:)
2016-02-22 18:02:04 -08:00
Max Moiseev
481bcabcba
[stdlib] API naming guidelines applied to split and join
...
- `separator` label for first argument of `split`
- `join` and related types are renamed to `joined`
2016-02-22 15:43:33 -08:00
Dmitri Gribenko
f27315b6f8
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-20 15:36:04 -08:00
WorldDownTown
bb762496bb
Rewrite _copyToNativeArrayBuffer to use early return if separator count is zero
2016-02-20 21:09:55 +09:00
Dmitri Gribenko
b90470e2fe
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-19 09:51:53 -08:00
Dmitri Gribenko
d18308d82b
Merge pull request #1365 from Nirma/join_logic_simplification
...
Logic simplification of next() function in JoinGenerator Struct.
2016-02-19 08:54:12 -08:00
Nicholas Maccharoli
0541028b62
Remove unnecessary nil initialization of optional
2016-02-19 18:03:40 +09:00
Nicholas Maccharoli
dd0c9719ee
Logic simplification of next() function in JoinGenerator Struct.
2016-02-19 18:00:04 +09:00
Dmitri Gribenko
98561f6137
stdlib: joinWithSeparator(_:) => join(separator:)
2016-02-18 22:30:57 -08:00
Dmitri Gribenko
6c64dcf499
stdlib: lowercase enum cases in _JoinIteratorState
2016-02-18 22:30:57 -08:00
Dmitri Gribenko
dd75aed67a
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-17 14:40:05 -08:00
Nate Cook
51251dc133
Convert imperative function summaries to present.
...
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74
Remove style on *generator* and friends.
2016-02-12 04:20:01 -06:00
Max Moiseev
61c837209b
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-02-04 16:13:39 -08:00
Slava Pestov
55644c1540
stdlib: Remove Self parameter from SequenceType._preprocessingPass
...
This code as written is not sound and should not type check
for non-final classes conforming to SequenceType (eg, NSArray).
Instead, capture the base of the call from the preprocess closure
passed in. The closure is @noescape, so it should be equivalent.
2016-01-29 12:18:39 -08:00
Dmitri Gribenko
9bcd5a1056
Collection.length => .count
2016-01-22 18:41:19 -08:00
Dmitri Gribenko
574052f1be
stdlib: standardize fatalError() messages for unavailable APIs
2016-01-21 16:34:54 -08:00
Max Moiseev
86680ec622
[stdlib] @available attributes for removed APIs
2016-01-20 13:08:27 -08:00
Max Moiseev
f51e708a8f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2016-01-04 12:25:25 -08:00
Zach Panzarino
e3a4147ac9
Update copyright date
2015-12-31 23:28:40 +00:00
Max Moiseev
5ccc258f71
func underestimatedLength() => var underestimatedLength { get }
2015-12-18 16:22:24 -08:00
Max Moiseev
b3fcc5fefa
underestimateLength() => underestimatedLength()
2015-12-18 16:22:24 -08:00
Dmitri Gribenko
73ce9ae7e9
Collection.count => .length
...
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Maxim Moiseev
844b81c46b
SequenceType => Sequence
2015-12-09 17:16:56 -08:00
Dmitri Gribenko
5a07f89297
Remove 'generator' from names of test functions and local variables
2015-12-09 17:15:11 -08:00
Dmitri Gribenko
1c0047829a
Rename SequenceType.generate() to SequenceType.iterator()
2015-12-09 17:11:17 -08:00