Commit Graph

42 Commits

Author SHA1 Message Date
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
Nate Cook
bd6025f463 [stdlib] Various documentation fixes
- Fix incorrect type in Float(_:String) examples
- Expand discussions for ExpressibleBy_Literal protocols
- Add notes about non-escaping unsafe pointers from closures
- Add note about isEmpty to Collection.count discussions
- Describe imported `Bool` types
- Clean up some floating point discussions
- Provide some additional operator documentation
- Revise documentation for CVarArg functions
- Fix incorrect Set method parameter descriptions
- Clarify array bridging behavior
- Add collection subscript complexity notes
2016-11-11 11:23:49 -06:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Alex Martini
99dce85a6b Correct see-also markup in doc comments. 2016-09-19 13:48:36 -07:00
Nate Cook
8b39706c3f [stdlib] Documentation revisions
- Various edits
- Standardized complexity formatting
2016-08-12 12:24:36 -05: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
Dmitri Gribenko
824bccc871 stdlib: change Collection._copyToNativeArrayBuffer() to be defined in terms of public types 2016-07-11 10:54:43 -07:00
Nate Cook
44b2d56a7f [stdlib] Revise documentation for string-related types
This documentation revision covers a large number of types & protocols:
String, its views and their indices, the Unicode codec types and protocol,
as well as Character, UnicodeScalar, and StaticString, among others.

This also includes a few small changes across the standard library for
consistency.
2016-05-22 03:04:22 -05: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
Trent Nadeau
6e327b4ddb Updated stdlib to use @discardableResult and _ = . 2016-05-11 22:53:37 -04:00
practicalswift
1a4cf40a30 [gardening] Fix recently introduced top of file headers. 2016-05-06 19:56:26 +02:00
practicalswift
8e3ba900b0 [gardening] Fix recently introduced headers. 2016-05-01 12:59:13 +02:00
Dave Abrahams
9bee5d182f [stdlib] location/formLocation => index/formIndex 2016-04-26 17:46:16 -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
Dave Abrahams
47a870cc50 [stdlib] Use location/formLocation for all index movement 2016-04-21 17:13:41 -07:00
Dmitri Gribenko
735f1287b0 Merge remote-tracking branch 'origin/swift-3-indexing-model' into swift-3-indexing-model 2016-04-14 14:10:27 -07:00
Dmitri Gribenko
10697f939f Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model 2016-04-14 13:45:27 -07:00
Max Moiseev
37bf02f7da [stdlib][swift-3-indexing-model] changes in index(_:stepsFrom:limitedBy:)
- index(_:stepsFrom:limitedBy:) returns Index?
- formIndex(_:stepsFrom:limitedBy) returns Bool
2016-04-14 11:49:27 -07:00
Max Moiseev
1a875cb922 [stdlib][swift-3-indexing-model] speeding up the compilation 2016-04-08 11:06:05 -07:00
Max Moiseev
590f62f3bd [stdlib][swift-3-indexing-model] introducing new LazyCollections
- Instead of just one there are now three:
  - LazyCollection
  - LazyBidirectionalCollection
  - LazyRandomAccessCollection
- ReversedCollection now conforms to BidirectionalCollection
- Lazy tests compile and run (#if'ed pieces that don't typecheck)
2016-04-08 11:06:05 -07:00
Max Moiseev
b7a1b1d1e0 Revert "[stdlib][swift-3-indexing-model] introducing new LazyCollections"
This reverts commit 5ad441f35a.
2016-04-06 13:07:31 -07:00
Max Moiseev
5ad441f35a [stdlib][swift-3-indexing-model] introducing new LazyCollections
- Instead of just one there are now three:
  - LazyCollection
  - LazyBidirectionalCollection
  - LazyRandomAccessCollection
- ReversedCollection now conforms to BidirectionalCollection
- Lazy tests compile and run (#if'ed pieces that don't typecheck)
2016-04-06 10:11:30 -07:00
Dave Abrahams
ad43a596bd [stdlib] Retire the old lazy subsystem...
...replacing it with the new, after passing API review!

* The lazy free function has become a property.

* Before we could extend protocols, we lacked a means for value types to
  share implementations, and each new lazy algorithm had to be added to
  each of up to four types: LazySequence, LazyForwardCollection,
  LazyBidirectionalCollection, and LazyRandomAccessCollection. These
  generic adapters hid the usual algorithms by defining their own
  versions that returned new lazy generic adapters. Now users can extend
  just one of two protocols to do the same thing: LazySequenceType or
  LazyCollectionType.

* To avoid making the code duplication worse than it already was, the
  generic adapters mentioned above were used to add the lazy generic
  algorithms around simpler adapters such as MapSequence that just
  provided the basic requirements of SequenceType by applying a
  transformation to some base sequence, resulting in deeply nested
  generic types as shown here. Now, MapSequence is an instance of
  LazySequenceType (and is renamed LazyMapSequence), and thus transmits
  laziness to its algorithms automatically.

* Documentation comments have been rewritten.

* The .array property was retired

* various renamings

* A bunch of Gyb files were retired.

Swift SVN r30902
2015-08-01 03:52:13 +00:00
Dave Abrahams
524810f579 [stdlib] Documentation touch-ups for LazyCollection
Swift SVN r30472
2015-07-21 22:35:40 +00:00
Dave Abrahams
8b9d9a3a25 [stdlib] LazyCollection commenting and cleanup.
Swift SVN r30368
2015-07-18 05:36:27 +00:00
Dave Abrahams
9f59c9d52d [stdlib] More lazy doc comment updates
Swift SVN r30359
2015-07-18 02:58:34 +00:00
Dave Abrahams
6d3119e2a3 strip _prext_ from inside doc comments
Swift SVN r30279
2015-07-16 22:55:28 +00:00
Dave Abrahams
88aaed0a0c [stdlib] Move most of the lazy prototype into the stdlib
Swift SVN r30144
2015-07-13 15:36:17 +00:00
Dmitri Hrybenko
82122f9362 stdlib: fixit-based migrations for generic parameter renames
rdar://21538940

Swift SVN r29756
2015-06-27 04:06:27 +00:00
Dmitri Hrybenko
deac6d7020 stdlib: rename generic parameters from T to Element
... for LazySequence, LazyForwardCollection, LazyBidirectionalCollection,
LazyRandomAccessCollection.

Part of rdar://21429126

Swift SVN r29633
2015-06-24 20:42:01 +00:00
Dmitri Hrybenko
313701286b stdlib: Various punctuation and markup improvements to the comments.
Patch by Brian Lanier.

Swift SVN r28659
2015-05-16 03:04:51 +00:00
Dmitri Hrybenko
68ef59e37a stdlib: Convert comments to use '- requires:' instead of 'Requires:'.
Tidy misc. comments and markdown along the way.

Patch by Brian Lanier.

Swift SVN r28473
2015-05-12 17:47:11 +00:00
Dave Abrahams
5c55682d8b [stdlib] Capitalize keywords in doc comments
Again, the text is a lot more readable that way.

Swift SVN r28472
2015-05-12 16:59:13 +00:00
Dmitri Hrybenko
25e74d21db stdlib: protocol extensions: de-underscore last
Swift SVN r28243
2015-05-07 00:30:32 +00:00
Dmitri Hrybenko
d790954154 stdlib: protocol extensions: de-underscore first
Swift SVN r28242
2015-05-07 00:30:30 +00:00
Dmitri Hrybenko
e96ade89a9 stdlib: protocol extensions: de-underscore isEmpty
Swift SVN r28241
2015-05-07 00:30:29 +00:00
Dmitri Hrybenko
275cfc0545 stdlib: protocol extensions: de-underscore underestimateCount()
Swift SVN r28240
2015-05-07 00:30:28 +00:00
David Farler
9e28dc777a Update standard library doc comments to Markdown
rdar://problem/20180478

Swift SVN r27726
2015-04-26 00:07:11 +00:00
Dmitri Hrybenko
c48d6aa0ab stdlib: change underestimateCount() into a method
rdar://19895265

Swift SVN r27346
2015-04-16 05:05:17 +00:00
Dmitri Hrybenko
ff2dd6320a stdlib: fix coding style
When colon specifies is-a relationship between types, we put spaces on
both sides of the colon.

Swift SVN r27016
2015-04-05 05:54:55 +00:00
Dave Abrahams
2a84ade467 [stdlib] Clarify an oft-repeated doc comment
Thanks, Dmitri!

Swift SVN r26512
2015-03-25 01:54:08 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00