1swift(1) Swift Documentation swift(1)
2
3
4
6 swift -- Safe, fast, and expressive general-purpose programming
7 language
8
10 To invoke the Swift REPL (Read-Eval-Print-Loop):
11
12 swift repl
13
14 To execute a Swift program:
15
16 swift program.swift <arguments>
17
18 To work with the Swift Package Manager:
19
20 swift build|package|run|test [options] <inputs>
21
22 To invoke the Swift compiler:
23
24 swiftc [options] <inputs>
25
26 A list of supported options is available through the "-help" option:
27
28 swift -help
29
30 swift build -help
31
32 swiftc -help
33
35 Swift is a general-purpose programming language built using a modern
36 approach to safety, performance, and software design patterns.
37
38 The goal of the Swift project is to create the best available language
39 for uses ranging from systems programming, to mobile and desktop apps,
40 scaling up to cloud services. Most importantly, Swift is designed to
41 make writing and maintaining correct programs easier for the developer.
42 To achieve this goal, we believe that the most obvious way to write
43 Swift code must also be:
44
45 Safe. The most obvious way to write code should also behave in a safe
46 manner. Undefined behavior is the enemy of safety, and developer
47 mistakes should be caught before software is in production. Opting for
48 safety sometimes means Swift will feel strict, but we believe that
49 clarity saves time in the long run.
50
51 Fast. Swift is intended as a replacement for C-based languages (C, C++,
52 and Objective-C). As such, Swift must be comparable to those languages
53 in performance for most tasks. Performance must also be predictable and
54 consistent, not just fast in short bursts that require clean-up later.
55 There are lots of languages with novel features - being fast is rare.
56
57 Expressive. Swift benefits from decades of advancement in computer
58 science to offer syntax that is a joy to use, with modern features
59 developers expect. But Swift is never done. We will monitor language
60 advancements and embrace what works, continually evolving to make Swift
61 even better.
62
64 Reporting bugs is a great way for anyone to help improve Swift. The
65 issue tracker for Swift, an open-source project, is located at
66 <https://github.com/apple/swift/issues>.
67
68 If a bug can be reproduced only within an Xcode project or a
69 playground, or if the bug is associated with an Apple NDA, please file
70 a report to Apple's Feedback Assistant at
71 <https://feedbackassistant.apple.com> instead.
72
74 HOME PAGE
75 <https://swift.org>
76
77 APPLE DEVELOPER RESOURCES
78 <https://developer.apple.com/swift/resources>
79
80 CODE REPOSITORIES
81 Swift Programming Language at <https://github.com/apple/swift>
82
83 Swift Package Manager at
84 <https://github.com/apple/swift-package-manager>
85
86
87
88swift 5.8.1 2023-08-22 swift(1)