Skip to content

Commit 4b4dd42

Browse files
authored
Merge pull request #5 from 8bitmp3/patch-1
Update Swift Numerics README to address feedback
2 parents 6f96e65 + 7be984d commit 4b4dd42

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
## Introduction
44

5-
Swift Numerics provides a set of modules that support numerical computing in Swift. These modules fall broadly into two categories:
5+
Swift Numerics provides a set of modules that support numerical computing in Swift.
6+
These modules fall broadly into two categories:
67

78
- API that is too specialized to go into the standard library, but which is sufficiently general to be centralized in a single common package.
89
- API that is under active development toward possible future inclusion in the standard library.
910

1011
There is some overlap between these two categories, and an API that begins in the first category may migrate into the second as it matures and new uses are discovered.
1112

12-
Swift Numerics modules are fine-grained. For example, if you need support for Complex numbers, you can import ComplexModule¹ as a standalone module:
13+
Swift Numerics modules are fine-grained.
14+
For example, if you need support for Complex numbers, you can import ComplexModule¹ as a standalone module:
1315

1416
```swift
1517
import ComplexModule
@@ -29,7 +31,8 @@ Swift Numerics modules have minimal dependencies on other projects.
2931

3032
The current modules assume only the availability of the Swift and C standard libraries and the runtime support provided by compiler-rt.
3133

32-
Future expansion may assume the availability of other standard interfaces, such as [BLAS (Basic Linear Algebra Subprograms)](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) and [LAPACK (Linear Algebra Package)](https://en.wikipedia.org/wiki/LAPACK). But modules with more specialized dependencies (or dependencies that are not available on all platforms supported by Swift) belong in a separate package.
34+
Future expansion may assume the availability of other standard interfaces, such as [BLAS (Basic Linear Algebra Subprograms)](https://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms) and [LAPACK (Linear Algebra Package)](https://en.wikipedia.org/wiki/LAPACK).
35+
But modules with more specialized dependencies (or dependencies that are not available on all platforms supported by Swift) belong in a separate package.
3336

3437
Because we intend to make it possible to adopt Swift Numerics modules in the standard library at some future point, Swift Numerics uses the same license and contribution guidelines as the Swift project.
3538

@@ -56,7 +59,8 @@ To use Swift Numerics in a SwiftPM project:
5659

5760
## Contributing to Swift Numerics
5861

59-
Swift Numerics is a standalone library that is separate from the core Swift project. In practice, it will act as a staging ground for some APIs that may eventually be incorporated into the Swift Standard Library. When that happens, such changes will be proposed to the Swift Standard Library using the established evolution process of the Swift project.
62+
Swift Numerics is a standalone library that is separate from the core Swift project, but it will sometimes act as a staging ground for APIs that will later be incorporated into the Swift Standard Library.
63+
When that happens, such changes will be proposed to the Swift Standard Library using the established evolution process of the Swift project.
6064

6165
Swift Numerics uses GitHub issues to track bugs and features. We use pull requests for development.
6266

@@ -84,8 +88,8 @@ Questions about how to use Swift Numerics modules, or issues that are not clearl
8488

8589
## Modules
8690

87-
1. About [`RealModule`](Sources/RealModule/README.md)
88-
2. About [`ComplexModule`](Sources/ComplexModule/README.md)
91+
1. [`RealModule`](Sources/RealModule/README.md)
92+
2. [`ComplexModule`](Sources/ComplexModule/README.md)
8993

9094
## Future expansion
9195

@@ -96,7 +100,8 @@ Questions about how to use Swift Numerics modules, or issues that are not clearl
96100

97101
## Notes
98102

99-
¹ Swift is currently unable to use the fully-qualified name for types when a type and module have the same name (discussion here: https://forums.swift.org/t/pitch-fully-qualified-name-syntax/28482). This would prevent users of Swift Numerics who don't need generic types from doing things, such as:
103+
¹ Swift is currently unable to use the fully-qualified name for types when a type and module have the same name (discussion here: https://forums.swift.org/t/pitch-fully-qualified-name-syntax/28482).
104+
This would prevent users of Swift Numerics who don't need generic types from doing things, such as:
100105

101106
```swift
102107
import Complex
@@ -114,4 +119,7 @@ typealias Complex = ComplexModule.Complex<Double>
114119
let a = ComplexModule.Complex<Float>
115120
```
116121

117-
The `Real` module does not contain a `Real` type, but does contain a `Real` protocol, and users may want to define their own `Real` type (and possibly re-export the `Real` module) - that is why the suffix is also applied there. New modules have to evaluate this decision carefully, but can err on the side of adding the suffix. It's expected that most users will simply `import Numerics`, so this isn't an issue for them.
122+
The `Real` module does not contain a `Real` type, but does contain a `Real` protocol.
123+
Users may want to define their own `Real` type (and possibly re-export the `Real` module)--that is why the suffix is also applied there.
124+
New modules have to evaluate this decision carefully, but can err on the side of adding the suffix.
125+
It's expected that most users will simply `import Numerics`, so this isn't an issue for them.

0 commit comments

Comments
 (0)