Skip to content

Commit b464548

Browse files
hitstergtdpracticalswift
authored andcommitted
[docs] Doc and typo fixes (#2098)
* [docs] Doc and typo fixes - properly hyphenate Objective-C - replace *dynamicism* with *dynamism* * [docs] Doc and typo fixes - properly hyphenate Objective-C - replace *dynamicism* with *dynamism*
1 parent bc2f842 commit b464548

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/ErrorHandlingRationale.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,10 +1072,10 @@ from out-of-memory conditions. For this reason, many C++ projects
10721072
explicitly disable exceptions and rely on other error propagation
10731073
mechanisms, on which there is no widespread consensus.
10741074
1075-
Objective C
1075+
Objective-C
10761076
-----------
10771077
1078-
Objective C has a first-class exceptions mechanism which is similar in
1078+
Objective-C has a first-class exceptions mechanism which is similar in
10791079
feature set to Java's: ``@throw`` / ``@try`` / ``@catch`` / ``@finally``.
10801080
Exception values must be instances of an Objective-C class. The
10811081
language does a small amount of implicit frame cleanup during
@@ -1084,18 +1084,18 @@ stack copies of ``__block`` variables are torn down, and ARC ``__weak``
10841084
variables are destroyed. However, the language does not release
10851085
object pointers held in local variables, even (by default) under ARC.
10861086
1087-
Objective C exceptions used to be implemented with ``setjmp``,
1087+
Objective-C exceptions used to be implemented with ``setjmp``,
10881088
``longjmp``, and thread-local state managed by a runtime, but the only
10891089
surviving platform we support which does that is i386, and all others
10901090
now use a "zero-cost" implementation that interoperates with C++
10911091
exceptions.
10921092
1093-
Objective C exceptions are *mostly* only used for unrecoverable
1093+
Objective-C exceptions are *mostly* only used for unrecoverable
10941094
conditions, akin to what I called "failures" above. There are a few
10951095
major exceptions to this rule, where APIs that do use exceptions to
10961096
report errors.
10971097
1098-
Instead, Objective C mostly relies on manual propagation,
1098+
Instead, Objective-C mostly relies on manual propagation,
10991099
predominantly using out-parameters of type ``NSError**``. Whether the
11001100
call failed is usually *not* indicated by whether a non-``nil`` error
11011101
was written into this parameter; calls are permitted both to succeed
@@ -1110,7 +1110,7 @@ null object result is valid.
11101110
CF APIs, meanwhile, have their own magnificent set of somewhat
11111111
inconsistent conventions.
11121112
1113-
Therefore, we can expect that incrementally improving CF / Objective C
1113+
Therefore, we can expect that incrementally improving CF / Objective-C
11141114
interoperation is going to be a long and remarkably painful process.
11151115
11161116

docs/OptimizationTips.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ This mode can be enabled using the Xcode build setting 'Whole Module Optimizatio
5959
Reducing Dynamic Dispatch
6060
=========================
6161

62-
Swift by default is a very dynamic language like Objective-C. Unlike Objective
63-
C, Swift gives the programmer the ability to improve runtime performance when
64-
necessary by removing or reducing this dynamicism. This section goes through
62+
Swift by default is a very dynamic language like Objective-C. Unlike Objective-C,
63+
Swift gives the programmer the ability to improve runtime performance when
64+
necessary by removing or reducing this dynamism. This section goes through
6565
several examples of language constructs that can be used to perform such an
6666
operation.
6767

0 commit comments

Comments
 (0)