Skip to content

Commit 38dbb75

Browse files
authored
Merge pull request #2174 from wilzbach/articles
Move articles pages to /articles
2 parents 3467bb2 + 77afe60 commit 38dbb75

30 files changed

+127
-81
lines changed

.htaccess

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,26 @@ Redirect 301 /sponsors.html https://dlang.org/foundation/sponsors.html
6767
Redirect 301 /dlangupb-scholarship.html https://dlang.org/foundation/updscholarship.html
6868
Redirect 301 /donate.html https://dlang.org/foundation/donate.html
6969

70+
# Legacy article pages
71+
Redirect 301 /ctod.html /articles/ctod.html
72+
Redirect 301 /cpptod.html /articles/cpptod.html
73+
Redirect 301 /pretod.html /articles/pretod.html
74+
Redirect 301 /code_coverage.html /articles/code_coverage.html
75+
Redirect 301 /exception-safe.html /articles/exception-safe.html
76+
Redirect 301 /hijack.html /articles/hijack.html
77+
Redirect 301 /intro-to-datetime.html /articles/intro-to-datetime.html
78+
Redirect 301 /lazy-evaluation.html /articles/lazy-evaluation.html
79+
Redirect 301 /migrate-to-shared.html /articles/migrate-to-shared.html
80+
Redirect 301 /mixin.html /articles/mixin.html
81+
Redirect 301 /regular-expression.html /articles/regular-expression.html
82+
Redirect 301 /safed.html /articles/safed.html
83+
Redirect 301 /templates-revisited.html /articles/templates-revisited.html
84+
Redirect 301 /ctarguments.html /articles/ctarguments.html
85+
Redirect 301 /variadic-function-templates.html /articles/variadic-function-templates.html
86+
Redirect 301 /d-array-article.html /articles/d-array-article.html
87+
Redirect 301 /cppcontracts.html /articles/cppcontracts.html
88+
Redirect 301 /template-comparison.html /articles/template-comparison.html
89+
Redirect 301 /dll-linux.html /articles/dll-linux.html
90+
7091
# Error pages
7192
ErrorDocument 404 /404.html

articles/articles.ddoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ROOT_DIR = ../
File renamed without changes.
File renamed without changes.
File renamed without changes.

cppcontracts.dd renamed to articles/cppcontracts.dd

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Ddoc
22

33
$(COMMUNITY D's Contract Programming vs C++'s,
44

5+
$(HEADERNAV_TOC)
6+
57
$(P Many people have written me saying that D's Contract Programming
68
does not add anything that C++ does not already support.
79
They go on to illustrate their point with a technique for doing Contracts in
@@ -16,7 +18,7 @@ $(COMMUNITY D's Contract Programming vs C++'s,
1618
to support Contracts, but they are not covered here because they are not
1719
part of standard C++ and are not supported by any other C++ compiler.)
1820

19-
$(H2 Contract Programming in D)
21+
$(H2 $(LNAME2 contract-programming-d, Contract Programming in D))
2022

2123
This is more fully documented in the D
2224
<a href="contracts.html">Contract Programming</a> document.
@@ -64,9 +66,9 @@ $(H2 Contract Programming in D)
6466

6567
)
6668

67-
$(H2 Contract Programming in C++)
69+
$(H2 $(LNAME2 contract-progamming-cpp, Contract Programming in C++))
6870

69-
$(H3 The $(D assert) Macro)
71+
$(H3 $(LNAME2 assert-macro, The $(D assert) Macro))
7072

7173
$(P C++ does have the basic $(D assert) macro, which tests its argument
7274
and if it fails, aborts the program. $(D assert) can be turned
@@ -80,7 +82,7 @@ $(H3 The $(D assert) Macro)
8082
$(P $(D assert) is where explicit support for Contracts in Standard C++
8183
begins and ends.)
8284

83-
$(H3 Class Invariants)
85+
$(H3 $(LNAME2 class-invariant, Class Invariants))
8486

8587
Consider a class invariant in D:
8688

@@ -215,7 +217,7 @@ int A::foo()
215217
The #if DBC is still there because some compilers may not
216218
optimize the whole thing away if check_invariants compiles to nothing.
217219

218-
$(H2 Preconditions and Postconditions)
220+
$(H3 Preconditions and Postconditions)
219221

220222
Consider the following in D:
221223

@@ -366,7 +368,7 @@ int foo(int a, int b)
366368
}
367369
)
368370

369-
$(H2 Preconditions and Postconditions for Member Functions)
371+
$(H3 $(LNAME2 pre-post-conditions, Preconditions and Postconditions for Member Functions))
370372

371373
Consider the use of preconditions and postconditions for a
372374
polymorphic function in D:
@@ -464,7 +466,7 @@ public:
464466
and parameters
465467
for $(D foo()).
466468

467-
$(H2 Conclusion)
469+
$(H2 $(LNAME2 conclusion, Conclusion))
468470

469471
$(P These C++ techniques can work up to a point. But, aside from
470472
$(D assert), they are not standardized and so will vary from
@@ -476,7 +478,7 @@ $(H2 Conclusion)
476478
way to use Contracts and get it right. Being in the language standardizes
477479
the way it will be used from project to project.)
478480

479-
$(H2 References)
481+
$(H2 $(LNAME2 references, References))
480482

481483
$(P Chapter C.11 introduces the theory and rationale of
482484
Contract Programming in
@@ -495,5 +497,6 @@ $(H2 References)
495497

496498
Macros:
497499
TITLE=D's Contract Programming vs C++'s
500+
SUBNAV=$(SUBNAV_ARTICLES)
498501

499502

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)