@@ -30,14 +30,14 @@ checks whether a value is missing before using the value,
3030and non-optional values are guaranteed to never be missing.
3131
3232Swift is a safe language,
33- which means it helps you find and fix several categories of bugs
33+ which means it makes it easier for you find and fix several categories of bugs
3434as early as possible during the development process,
3535and lets you guarantee that certain kinds of bugs can't happen.
36- Type safety helps you to be clear about
36+ Type safety enables you to be clear about
3737the types of values your code works with.
3838If part of your code requires a ` String ` ,
3939type safety prevents you from passing it an ` Int ` by mistake.
40- Data safety helps you work with only valid data,
40+ Data safety ensures that you work with valid data only ,
4141not uninitialized memory or deinitialized objects,
4242and ensures that you work with that data in safe ways ---
4343even in programs that run multiple pieces of code at the same time.
@@ -573,9 +573,9 @@ Swift provides two signed floating-point number types:
573573Every value in a Swift program has a type.
574574Every place you store a value ---
575575including constants, variables, and properties ---
576- also has a type,
577- which you might write explicitly using a type annotation
578- or which might inferred from an initial value.
576+ also has a type.
577+ You might write the type explicitly using a type annotation,
578+ or Swift might infer the type from an initial value.
579579Every place in your code where you provide a value,
580580that value's type must match the place you use it.
581581For example,
@@ -587,7 +587,7 @@ A type safe language encourages you to be clear about
587587the types of values your code works with.
588588Values of one type are never implicitly converted to another type.
589589However, some types can be explicitly converted.
590- When building code
590+ When building code,
591591Swift checks the code for type safety
592592and flags any mismatched types as errors.
593593
@@ -1799,9 +1799,9 @@ if let definiteString = assumedString {
17991799## Data Safety
18001800
18011801In addition to the checks that prevent type mismatches,
1802- which are described above in < doc:TheBasics#Type-Safety-and-Type-Inference > ,
1802+ described above in < doc:TheBasics#Type-Safety-and-Type-Inference > ,
18031803Swift also protects code against working with invalid memory.
1804- This is known as * data safety* or * memory safety*
1804+ This protection is known as * data safety* or * memory safety*
18051805and includes the following requirements:
18061806
18071807- Values are set before being read;
@@ -1826,18 +1826,21 @@ see <doc:Concurrency>.
18261826Sometimes you need to work outside of the bounds of safety ---
18271827for example, because of limitations of the language or standard library ---
18281828so Swift also provides unsafe versions of some APIs.
1829- When you use types or methods whose name includes words like
1829+ When you use types or methods whose name includes words such as
18301830"unsafe", "unchecked", or "unmanaged",
18311831you take on the responsibility for safety.
18321832
18331833Safe code in Swift can still encounter errors and unexpected failures,
18341834which might stop the program's execution.
1835- Safety makes no guarantee about whether your code runs to completion.
1835+ Safety doesn't ensure that your code runs to completion.
18361836Swift provides several ways to indicate and recover from errors,
18371837discussed in < doc:TheBasics#Error-Handling >
18381838and < doc:TheBasics#Assertions-and-Preconditions > below.
18391839However, in some cases,
18401840the * only* safe way to handle an error is to stop execution.
1841+ If you need to guarantee that a service never unexpected stops,
1842+ incorporate fault tolerance into its overall architecture,
1843+ so it can recover from any of its components stopping unexpectedly.
18411844
18421845## Error Handling
18431846
0 commit comments