Skip to content

Commit 0f73c7a

Browse files
committed
Update newly moved articles
1 parent 5ff928f commit 0f73c7a

File tree

4 files changed

+16
-24
lines changed

4 files changed

+16
-24
lines changed

articles/articles.ddoc

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

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

articles/dll-linux.dd

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,7 @@ Ddoc
22

33
$(D_S Writing Shared Libraries With D On Linux,
44

5-
$(P $(RED Preliminary and subject to change.))
6-
7-
$(UL
8-
$(LI $(RELATIVE_LINK2 dso1, Statically Linking C))
9-
$(LI $(RELATIVE_LINK2 dso2, Statically Loading a Shared library in C))
10-
$(LI $(RELATIVE_LINK2 dso3, Dynamically Loading a Shared library in C))
11-
$(LI $(RELATIVE_LINK2 dso4, Dynamically Loading a C++ Shared library in C))
12-
$(LI $(RELATIVE_LINK2 dso5, Statically Linking D Program With libphobos2.a))
13-
$(LI $(RELATIVE_LINK2 dso6, Statically Linking D Program With libphobos2.so))
14-
$(LI $(RELATIVE_LINK2 dso7, Creating a D Shared Library and Statically Linking With libphobos2.so))
15-
$(LI $(RELATIVE_LINK2 dso8, Dynamically Loading a C++ DLL From a D Program))
16-
$(LI $(RELATIVE_LINK2 dso9, Dynamically Loading a D DLL From a C Program))
17-
$(LI $(RELATIVE_LINK2 dso10, Dynamically Loading a D DLL From a D Program))
18-
)
5+
$(HEADERNAV_TOC)
196

207
$(P For comparison purposes and looking at the mechanics, here's how it's done in C first.
218
)
@@ -549,3 +536,4 @@ and the static destructors are called by dlclose().
549536

550537
Macros:
551538
TITLE=Writing Shared Libraries With D On Linux
539+
SUBNAV=$(SUBNAV_ARTICLES)

articles/template-comparison.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ $(P C++ pioneered templates and template metaprogramming, and continues
66
to improve on it with C++0x.
77
The D programming language is the first to comprehensively reengineer
88
templates based on the C++ experience.
9-
Since C++0x is not a ratified standard yet, proposed changes to C++
10-
are subject to change.)
9+
)
1110

1211
<table border="2" cellpadding="4" cellspacing="0" class="comp">
1312
<caption>Template Comparison Table</caption>
@@ -885,6 +884,7 @@ Macros:
885884
D_CODE = <pre class="d_code2">$0</pre>
886885
CPPCODE2 = <pre class="cppcode2">$0</pre>
887886
ERROR = $(RED $(B error))
887+
SUBNAV=$(SUBNAV_ARTICLES)
888888
META_KEYWORDS=D Programming Language, template metaprogramming,
889889
variadic templates, type deduction, dependent base class
890890
META_DESCRIPTION=Comparison of templates between the

0 commit comments

Comments
 (0)