|
1 |
| -<!-- |
2 |
| -要翻译的文件:https://github.com/SwiftGGTeam/the-swift-programming-language-in-chinese/blob/swift-6-beta-translation/swift-6-beta.docc/GuidedTour/AboutSwift.md |
3 |
| -Swift 文档源文件地址:https://docs.swift.org/swift-book/documentation/the-swift-programming-language/aboutswift |
4 |
| -翻译估计用时:⭐️ |
5 |
| ---> |
6 |
| - |
7 |
| -# About Swift |
| 1 | +# 关于 Swift |
8 | 2 |
|
9 |
| -Understand the high-level goals of the language. |
| 3 | +理解这门语言的高阶目标。 |
10 | 4 |
|
11 |
| -Swift is a fantastic way to write software |
12 |
| -for phones, tablets, desktops, servers, |
13 |
| -or anything else that runs code. |
14 |
| -It's a safe and fast programming language |
15 |
| -that combines the best in modern language thinking |
16 |
| -with wisdom from a diverse open source community. |
| 5 | +Swift 是为手机、平板电脑、台式机、服务器或任何其他运行代码的设备编写软件的绝佳方式。 |
| 6 | +它是一种安全且快速的编程语言,结合了现代语言思想的精华,并汲取了来自多元化的开源社区的智慧。 |
17 | 7 |
|
18 |
| -Swift is friendly to new programmers, |
19 |
| -without sacrificing the power and flexibility |
20 |
| -that experienced programmers need. |
21 |
| -It's an industrial-quality programming language |
22 |
| -that's as expressive and enjoyable as a scripting language. |
23 |
| -The compiler is optimized for performance |
24 |
| -and the language is optimized for development, |
25 |
| -without compromising on either. |
| 8 | +Swift 对于初学者来说很友好,同时也没有牺牲经验丰富的程序员所需要的强大和灵活性。 |
| 9 | +它是一种企业级的编程语言,但又有着脚本语言般的表达力和可玩性。 |
| 10 | +编译器经过精心优化,可以提供卓越的性能表现。同时语言本身也经过精心设计,以便于开发使用。 |
| 11 | +两者都没有做出任何妥协,鱼与熊掌兼得。 |
26 | 12 |
|
27 |
| -Swift defines away large classes of common programming errors |
28 |
| -by adopting modern programming patterns: |
| 13 | +Swift 通过采用现代编程模式来避免大量常见编程错误: |
29 | 14 |
|
30 |
| -- Variables are always initialized before use. |
31 |
| -- Array indices are checked for out-of-bounds errors. |
32 |
| -- Integers are checked for overflow. |
33 |
| -- Optionals ensure that `nil` values are handled explicitly. |
34 |
| -- Memory is managed automatically. |
35 |
| -- Error handling allows controlled recovery from unexpected failures. |
| 15 | +- 变量始终在使用前被初始化。 |
| 16 | +- 数组索引会进行越界检查。 |
| 17 | +- 整数运算会进行溢出检查。 |
| 18 | +- 可选类型确保 `nil` 值能够得到明确处理。 |
| 19 | +- 内存被自动管理。 |
| 20 | +- 错误处理机制使程序能够以可控方式从意外异常中恢复。 |
36 | 21 |
|
37 |
| -Swift code is compiled and optimized to get the most out of modern hardware. |
38 |
| -The syntax and standard library have been designed |
39 |
| -based on the guiding principle that |
40 |
| -the obvious way to write your code should also perform the best. |
41 |
| -Its combination of safety and speed make Swift an excellent choice for |
42 |
| -everything from "Hello, world!" to an entire operating system. |
| 22 | +Swift 代码经过编译和优化,以充分发挥现代硬件的性能。 |
| 23 | +其语法和标准库的设计遵循这样的指导思想: |
| 24 | +代码的最直观写法也应该具有最佳性能。 |
| 25 | +Swift 兼具安全性和速度, |
| 26 | +使其成为从编写 "Hello, world!" 到开发整个操作系统的绝佳选择。 |
43 | 27 |
|
44 |
| -Swift combines a modern, lightweight syntax |
45 |
| -that's familiar for developers coming from other popular languages |
46 |
| -with powerful features like type inference and pattern matching, |
47 |
| -allowing complex ideas to be expressed in a clear and concise manner. |
48 |
| -As a result, code is easier to read, write, and maintain. |
| 28 | +Swift 采用了现代化、轻量级的语法, |
| 29 | +这些语法对来自其他流行语言的开发者来说很熟悉。 |
| 30 | +它还具有类型推断和模式匹配等强大功能,能够以清晰简洁的方式表达复杂的概念。 |
| 31 | +这使得代码更易于阅读、编写和维护。 |
49 | 32 |
|
50 |
| -Swift continues to evolve with thoughtful new features and powerful capabilities. |
51 |
| -The goals for Swift are ambitious. |
52 |
| -We can’t wait to see what you create with it. |
| 33 | +Swift 仍在不断发展,不断推出经过深思熟虑的新特性和强大的功能。 |
| 34 | +Swift 的目标非常远大。 |
| 35 | +我们非常期待看到你使用它创造出的作品。 |
53 | 36 |
|
54 |
| -> Beta Software: |
| 37 | +> 测试版软件: |
55 | 38 | >
|
56 |
| -> This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software. |
| 39 | +> 本文档包含有关正在开发的 API 或技术的初步信息。此信息可能会发生变化,根据本文档实施的软件应使用最终操作系统软件进行测试。 |
57 | 40 | >
|
58 |
| -> Learn more about using [Apple's beta software](https://developer.apple.com/support/beta-software/). |
| 41 | +> 了解有关使用 [Apple 测试版软件](https://developer.apple.com/support/beta-software/) 的更多信息. |
59 | 42 |
|
60 | 43 | <!--
|
61 | 44 | This source file is part of the Swift.org open source project
|
62 |
| -
|
63 | 45 | Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
|
64 | 46 | Licensed under Apache License v2.0 with Runtime Library Exception
|
65 |
| -
|
66 | 47 | See https://swift.org/LICENSE.txt for license information
|
67 | 48 | See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
68 |
| ---> |
| 49 | +--> |
0 commit comments