Skip to content

Commit f1e09f7

Browse files
authored
Further README updates (#54)
1 parent fe6bcfe commit f1e09f7

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
# Swift Foundation
1+
# Foundation
22

3-
The Foundation framework defines a low-level layer of functionality that is useful for almost all applications. It is designed with these goals in mind:
3+
The Foundation framework defines a low-level layer of functionality that is useful for many applications. It is designed with these goals in mind:
44

55
* Provide a small set of basic utility types.
66
* Make software development easier by introducing consistent conventions that can be widely adopted by the Swift ecosystem.
77
* Support internationalization and localization, to make software accessible to users around the world.
88
* Provide a level of OS independence, to enhance portability.
99

10-
This project is a preview of a unified Swift implementation of Foundation for all platforms. While the new package is not yet complete, it provides the first building blocks for early testing and contributions.
10+
This project aims to build a new and unified Swift implementation of Foundation for all platforms. The project is in its early stages, with features still to be implemented. Contributions are welcome, including API implementations, bug fixes, documentation, tests and ports to new platforms.
11+
## Current State
1112

12-
## Implementation Progress
13+
The following types are available in the preview package, with more to come later. Many types, including `JSONEncoder`, `Calendar`, `TimeZone`, and `Locale` are all-new Swift implementations. `FormatStyle` and `ParseStyle` available as open source for the first time.
1314

14-
The following types are available in the preview package, with more to come later:
15-
16-
* FoundationEssentials
15+
* **FoundationEssentials**
1716
* `AttributedString`
1817
* `Data`
1918
* `Date`
@@ -23,24 +22,21 @@ The following types are available in the preview package, with more to come late
2322
* `Predicate`
2423
* `String` extensions
2524
* `UUID`
26-
* Internationalization
25+
* **Internationalization**
2726
* `Calendar`
2827
* `TimeZone`
2928
* `Locale`
3029
* `DateComponents`
3130
* `FormatStyle`
3231
* `ParseStrategy`
3332

34-
35-
Wherever possible, code is shared between all platforms. In cases where platform-specific code is needed within a single source file, a compiler directive is used to include or exclude it.
36-
37-
For internationalization support on non-Darwin platforms, we created a separate package named *[FoundationICU](https://github.com/apple/swift-foundation-icu)*. This repository contains the necessary ICU implementations and data from the upstream [Apple OSS Distribution ICU](https://github.com/apple-oss-distributions/ICU), wrapped in Swift so FoundationInternationalization can easily depend on it. Using a common version of ICU will result in more reliable and consistent results when formatting dates, times, numbers, and more. As the upstream Apple ICU updates to newer version of ICU, the FoundationICU package will be updated with those changes.
33+
For internationalization support on non-Darwin platforms, we created a separate package named *[FoundationICU](https://github.com/apple/swift-foundation-icu)*. This repository contains the necessary ICU implementations and data from the upstream [Apple OSS Distribution ICU](https://github.com/apple-oss-distributions/ICU), wrapped in Swift so FoundationInternationalization can easily depend on it. Using a common version of ICU will result in more reliable and consistent results when formatting dates, times, and numbers.
3834

3935
> Note: The Foundation Preview package depends on the under-development [Swift 5.9 toolchain](https://www.swift.org/download).
4036
4137
## Performance
4238

43-
Being written in Swift, this new implementation provides some major benefits over the previous C and Objective-C versions. Code is shared across all platforms, is much easier to read and write, and also provides some great performance improvements.
39+
Being written in Swift, this new implementation provides some major benefits over the previous C and Objective-C versions.
4440

4541
`Locale`, `TimeZone` and `Calendar` no longer require bridging from Objective-C. Common tasks like getting a fixed `Locale` are an order of magnitude faster for Swift clients. `Calendar`'s ability to calculate important dates can take better advantage of Swift’s value semantics to avoid intermediate allocations, resulting in over a 20% improvement in some benchmarks. Date formatting using `FormatStyle` also has some major performance upgrades, showing a massive 150% improvement in a benchmark of formatting with a standard date and time template.
4642

@@ -54,16 +50,21 @@ For Foundation, our goal is to create the best fundamental data types and intern
5450

5551
Moving Foundation into this future requires not only an improved implementation, but also an improved process for using it outside of Apple’s platforms. Therefore, Foundation now has a path for the community to add new API for the benefit of Swift developers on every platform.
5652

57-
Swift Foundation is an independent package project in its early incubation stages. Inspired by the workgroups in the Swift project, it has a workgroup to (a) oversee [community API proposals](/Users/tony/Desktop/FoundationPreview_Final.md) and (b) to closely coordinate with developments in the Swift project and those on Apple’s platforms. In the future, we will explore how to sunset the existing [swift-corelibs-foundation](https://github.com/apple/swift-corelibs-foundation) and migrate to using the new version of Foundation created by this project.
53+
The Foundation package is an independent project in its early incubation stages. Inspired by the workgroups in the Swift project, it has a workgroup to (a) oversee [community API proposals](/Users/tony/Desktop/FoundationPreview_Final.md) and (b) to closely coordinate with developments in the Swift project and those on Apple’s platforms. In the future, we will explore how to sunset the existing [swift-corelibs-foundation](https://github.com/apple/swift-corelibs-foundation) and migrate to using the new version of Foundation created by this project.
5854

59-
The workgroup meets regularly to review proposals, look at emerging trends in the Swift on Server ecosystem, and discuss how the library can evolve to best meet our common goals.
60-
## Next Steps
55+
The workgroup meets regularly to review proposals, look at emerging trends in the Swift ecosystem, and discuss how the library can evolve to best meet our common goals.
56+
## Current Focus Area for Development
6157

6258
Quality and performance are our two most important goals for the project. Therefore, the plans for the first half of 2023 are continuing refinement of the core API, adding to our suites of unit and performance tests, and expanding to other platforms where possible, using the most relevant code from [swift-corelibs-foundation](https://github.com/apple/swift-corelibs-foundation).
6359

64-
We also want to try out our new community API proposal process. We aim to accept around three small proposals with corresponding Swift implementations. Experience from running reviews and accepting new API will help to refine the process, and allow scaling up to more contributions later this year and beyond.
65-
6660
Later this year, the porting effort will continue. It will bring high quality Swift implementations of additional important Foundation API such as `URL`, `Bundle`, `FileManager`, `FileHandle`, `Process`, `SortDescriptor`, `SortComparator` and more.
61+
62+
## Relationship of Foundation Package and Foundation Framework
63+
64+
The Swift code in the package is the core of the Foundation framework that ships on macOS, iOS, and other Apple platforms. As new Swift implementations of Foundation API are implemented in the package, Apple will use those implementations in the framework as well.
65+
66+
The Foundation framework may have the occasional need to add Darwin-specific API, but our goal is to share as much code and API between all platforms as possible. In cases where platform-specific code is needed within a single source file, a compiler directive is used to include or exclude it.
67+
6768
## Contributions
6869

69-
Foundation welcomes contributions from the community that align with our goals for the project. The package uses [GitHub Issues](https://github.com/apple/swift-corelibs-foundation) for tracking bugs, feature requests, and other work. Please see the [CONTRIBUTING](https://github.com/apple/swift-foundation/blob/main/CONTRIBUTING.md) document for more information, including the process for accepting community contributions for new API in Foundation.
70+
Foundation welcomes contributions from the community. The project uses the [Swift forums for discussion](https://forums.swift.org/c/related-projects/foundation/99) and [GitHub Issues](https://github.com/apple/swift-corelibs-foundation) for tracking bugs, feature requests, and other work. Please see the [CONTRIBUTING](https://github.com/apple/swift-foundation/blob/main/CONTRIBUTING.md) document for more information, including the process for accepting community contributions for new API in Foundation.

0 commit comments

Comments
 (0)