Skip to content

Commit d2c31a5

Browse files
authored
Merge pull request #2511 from n8sh/apostrophe-plural
Don't pluralize with apostrophe s, plus a few other apostrophe fixes merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 015944b + 41ad7ac commit d2c31a5

30 files changed

+73
-73
lines changed

articles/cpptod.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ $(H2 $(LNAME2 typedefs, Creating a new typedef'd type))
179179

180180
$(H4 The C++ Way)
181181

182-
Typedef's in C++ are weak, that is, they really do not introduce
182+
Typedefs in C++ are weak, that is, they really do not introduce
183183
a new type. The compiler doesn't distinguish between a typedef
184184
and its underlying type.
185185

articles/d-array-article.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,21 @@ $(H2 $(LNAME2 determinism, Determinism))
148148

149149
$(P There is one caveat with slice appending that can bite inexperienced, and even experienced D coders: the apparent non-deterministic behavior of appending.)
150150

151-
$(P Let's say we have a function which is passed a buffer, and writes some number of A's to the buffer (appending if necessary), returning the filled buffer:)
151+
$(P Let's say we have a function which is passed a buffer, and writes some number of 'A's to the buffer (appending if necessary), returning the filled buffer:)
152152

153153
------
154154
import std.stdio;
155155

156156
char[] fillAs(char[] buf, size_t num)
157157
{
158158
if (buf.length < num)
159-
buf.length = num; // increase buffer length to be able to hold the A's
159+
buf.length = num; // increase buffer length to be able to hold the 'A's
160160
buf[0..num] = 'A'; // assign A to all the elements
161161
return buf[0..num]; // return the result
162162
}
163163
------
164164

165-
$(P What's wrong with the $(D fillAs) function? Nothing really, but what happens if increasing the length forces the buffer to be reallocated? In that case, the buffer passed in is $(I not) overwritten with A's, only the reallocated buffer is. This can be surprising if you were expecting to continue to use the same buffer in further operations, or if you expected the original buffer to be filled with A's. The end result, depending on whether the block referenced by $(D buf[]) can be appended in place, is the caller's slice might be overwritten with A's, or it might not be.)
165+
$(P What's wrong with the $(D fillAs) function? Nothing really, but what happens if increasing the length forces the buffer to be reallocated? In that case, the buffer passed in is $(I not) overwritten with 'A's, only the reallocated buffer is. This can be surprising if you were expecting to continue to use the same buffer in further operations, or if you expected the original buffer to be filled with 'A's. The end result, depending on whether the block referenced by $(D buf[]) can be appended in place, is the caller's slice might be overwritten with 'A's, or it might not be.)
166166

167167
------
168168
// continued example...

articles/d-floating-point.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ $(P All IEEE-compiliant processors include special status bits that indicate whe
274274
$(P Here's a list of the weird things that can be detected:)
275275

276276
$(DL
277-
$(DT invalid) $(DD This is set if any NaN's have been generated. This can happen with $(INFIN) - $(INFIN), $(INFIN) * 0, 0 * $(INFIN), 0/0, $(INFIN)/$(INFIN), $(INFIN)%$(INFIN), or $(D x%0), for any number $(D x). Several other operations, such as sqrt(-1), can also generate a NaN. The $(I invalid) condition is also set when a 'signalling NaN' is accessed, indicating use of an uninitialized variable. This almost always indicates a programming error.)
277+
$(DT invalid) $(DD This is set if any NaNs have been generated. This can happen with $(INFIN) - $(INFIN), $(INFIN) * 0, 0 * $(INFIN), 0/0, $(INFIN)/$(INFIN), $(INFIN)%$(INFIN), or $(D x%0), for any number $(D x). Several other operations, such as sqrt(-1), can also generate a NaN. The $(I invalid) condition is also set when a 'signalling NaN' is accessed, indicating use of an uninitialized variable. This almost always indicates a programming error.)
278278

279279
$(DT overflow) $(DD Set if $(INFIN) was generated by adding or multiplying two numbers that were so large that the sum was greater than $(D real.max). This almost always indicates that the result is incorrect; and corrective action needs to be taken.)
280280

articles/hijack.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ void abc()
214214

215215
$(P and no error is generated. The difference here is that the user
216216
deliberately combined the overload sets in X and Y, and so presumably
217-
both knows what he's doing and is willing to check the $(CODE foo)'s when
217+
both knows what he's doing and is willing to check the $(CODE foo)s when
218218
X or Y is updated.
219219
)
220220

articles/rationale.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ infinity of a floating point type, rather than doing it in a library like C++:
162162
implying $(DOUBLEQUOTE the language and compiler don't know anything about IEEE 754
163163
floating point - so it cannot be relied on.) And in fact
164164
many otherwise excellent C++ compilers
165-
do not handle NaN's correctly in floating point comparisons.
165+
do not handle NaNs correctly in floating point comparisons.
166166
(Digital Mars C++ does do it correctly.)
167167
C++98 doesn't say anything about NaN or Infinity handling in expressions
168168
or library functions. So it must be assumed it doesn't work.
@@ -222,7 +222,7 @@ int test()
222222
------
223223
)
224224

225-
$(LI Static if's can appear where only declarations are allowed:
225+
$(LI Static ifs can appear where only declarations are allowed:
226226

227227
------
228228
class Foo
@@ -233,7 +233,7 @@ class Foo
233233
------
234234
)
235235

236-
$(LI Static if's can declare new type aliases:
236+
$(LI Static ifs can declare new type aliases:
237237

238238
------
239239
static if (0 || is(int T)) T x;

articles/regular-expression.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ $(D_S $(TITLE),
210210
not our intention. Breaking down this example, (?<=[.?!]) part looks behind for first ., ? or !.
211211
This get us half way to our goal because \s* also matches between elements of punctuation like "?!",
212212
so a negative lookahead is introduced $(I inside lookbehind) to make sure we are past all of the punctuation marks.
213-
Admittedly, barrage of ? and ! makes this regex rather obscure, more then it's actually is.
213+
Admittedly, barrage of ? and ! makes this regex rather obscure, more then it actually is.
214214
Observe that there are no restrictions on contents of lookaround expressions,
215215
one can go for lookahead inside lookbehind and so on.
216216
However in general it's recommended to use them sparingly, keeping them as the weapon of last resort.

articles/templates-revisited.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ template factorial(int n)
453453

454454
$(P
455455
reducing 13 lines of code to an arguably much cleaner 7 lines.
456-
$(D static if)'s are the equivalent of C++'s $(D #if).
456+
$(D static if)s are the equivalent of C++'s $(D #if).
457457
But $(D #if) cannot access template
458458
arguments, so all template conditional compilation must be handled with
459459
partial and explicitly specialized templates.

articles/variadic-function-templates.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ $(H3 The Static If Solution)
195195

196196
$(P It would be nice to encapsulate all the logic into a
197197
single function. One way to do that is by using
198-
static if's, which provide for conditional compilation:
198+
$D(static if)s, which provide for conditional compilation:
199199
)
200200

201201
---

changelog/2.054.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ $(VERSION Jul 10, 2011, =================================================,
7878
$(DMDBUGSFIXED
7979
$(LI $(BUGZILLA 693): 'this' can't be used as an alias parameter for a mixin)
8080
$(LI $(BUGZILLA 1373): typeof(func).stringof fails when func has parameters.)
81-
$(LI $(BUGZILLA 1411): ref Tuple should transform to Tuple of ref's)
81+
$(LI $(BUGZILLA 1411): ref Tuple should transform to Tuple of refs)
8282
$(LI $(BUGZILLA 1570): Wrong return for address operator)
8383
$(LI $(BUGZILLA 2180): filename error with #line)
8484
$(LI $(BUGZILLA 2521): Not possible to return immutable value by ref)

changelog/2.063.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ void main()
712712
$(LI $(LNAME2 attribinference, Methods of templated aggregates can now infer attributes:)
713713

714714
$(P If a function with some attributes instantiates a templated aggregate,
715-
it's member functions will infer those attributes:)
715+
its member functions will infer those attributes:)
716716

717717
---------
718718
struct S(T)
@@ -1005,7 +1005,7 @@ void test()
10051005
}
10061006
---------
10071007

1008-
$(P Allowing $(D template)'s inside of functions will enable better encapsulation and avoid the
1008+
$(P Allowing $(D template)s inside of functions will enable better encapsulation and avoid the
10091009
pollution of module-scoped symbol names.)
10101010

10111011
$(LI $(LNAME2 ufcslocalimport, UFCS now works with scoped local imports:)

0 commit comments

Comments
 (0)