You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,11 @@ For information on how to build Foundation, please see [Getting Started](Docs/Ge
49
49
50
50
## FAQ
51
51
52
-
#####Why include Foundation on Linux?
52
+
#### Why include Foundation on Linux?
53
53
54
54
We believe that the Swift standard library should remain small and laser-focused on providing support for language primitives. The Foundation framework has the flexibility to include higher-level concepts and to build on top of the standard library, much in the same way that it builds upon the C standard library and Objective-C runtime on Darwin platforms.
55
55
56
-
#####Why include NSString, NSDictionary, NSArray, and NSSet? Aren't those already provided by the standard library?
56
+
#### Why include NSString, NSDictionary, NSArray, and NSSet? Aren't those already provided by the standard library?
57
57
58
58
There are several reasons why these types are useful in Swift as distinct types from the ones in the standard library:
59
59
@@ -62,18 +62,18 @@ There are several reasons why these types are useful in Swift as distinct types
62
62
* They exist in archives, and we wish to maintain as much forward and backward compatibility with persistence formats as is possible.
63
63
* They are the backing for almost all Swift Array, Dictionary, and Set objects that you receive from frameworks implemented in Objective-C on Darwin platforms. This may be considered an implementation detail, but it leaks into client code in many ways. We want to provide them here so that your code will remain portable.
64
64
65
-
#####How do we decide if something belongs in the standard library or Foundation?
65
+
#### How do we decide if something belongs in the standard library or Foundation?
66
66
67
67
In general, the dividing line should be drawn in overlapping area of what people consider the language and what people consider to be a library feature.
68
68
69
69
For example, Optional is a type provided by the standard library. However, the compiler understands the concept to provide support for things like optional-chaining syntax. The compiler also has syntax for creating Arrays and Dictionaries.
70
70
71
71
On the other hand, the compiler has no built-in support for types like `URL`. `URL` also ties into more complex functionality like basic networking support. Therefore this type is more appropriate for Foundation.
72
72
73
-
#####Why not make the existing Objective-C implementation of Foundation open source?
73
+
#### Why not make the existing Objective-C implementation of Foundation open source?
74
74
75
75
Foundation on Darwin is written primarily in Objective-C, and the Objective-C runtime is not part of the Swift open source project. CoreFoundation, however, is a portable C library and does not require the Objective-C runtime. It contains much of the behavior that is exposed via the Foundation API. Therefore, it is used on all platforms including Linux.
76
76
77
-
#####How do I contribute?
77
+
#### How do I contribute?
78
78
79
79
We welcome contributions to Foundation! Please see the [known issues](Docs/Issues.md) page if you are looking for an area where we need help. We are also standing by on the [mailing lists](https://swift.org/community/#communication) to answer questions about what is most important to do and what we will accept into the project.
0 commit comments