Skip to content

Commit 0f42807

Browse files
authored
Expand & improve comparison.dd (#3833)
* Expand & improve `comparison.dd` Add items: * GC: manual invocation, @nogc * Functions: `ref` Reorder items a bit, indent some. Move: CTFE -> Metaprogramming Aliases -> Generic UDAs -> Other Generic: Add foreach, ranges, algorithms, aggregate templates. Rename Template Template parameters to alias parameters. Change links: Properties (more direct) concepts (wrong) -> constraints raii -> glossary more formal than wiki 80-bit -> vague type.html to float.html Add links. Add Metaprogramming group with string mixins and static foreach. Reliability: immutable, @safe. Add concurrency group: spawn, fibers, parallel, TLS, shared. Add Types group with struct, union, pointers, tuples. Move enum, 80-bit, complex to Types. Compat: C statements, importc, betterc. Other: `with`, documented unittests. * Add ref & pure functions * Tweak 2 links
1 parent 47ecf15 commit 0f42807

File tree

1 file changed

+70
-31
lines changed

1 file changed

+70
-31
lines changed

comparison.dd

Lines changed: 70 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ $(COMMUNITY D Concepts Overview,
55
$(P Navigate D's implementation of a few key programming language concepts.)
66

77
$(ITEMIZE
8-
$(A spec/garbage.html, Garbage Collection),
8+
$(A spec/garbage.html, Garbage Collection)
9+
$(ITEMIZE
10+
$(REF_ALTTEXT Manual invocation, GC.enable, core,memory),
11+
$(A spec/function.html#nogc-functions, `@nogc` subset)
12+
),
913
Functions
1014
$(ITEMIZE
11-
$(A spec/type.html#delegates, Function Delegates),
1215
$(A spec/function.html#function-overloading, Function Overloading),
13-
$(A spec/function.html#parameters, `out` parameters for functions),
16+
$(A spec/function.html#ref-params, `ref` and `out` function parameters),
17+
$(A spec/function.html#ref-functions, `ref` functions),
18+
$(A spec/type.html#delegates, Function Delegates),
1419
$(A spec/function.html#nested, Nested functions),
1520
$(A spec/expression.html#FunctionLiteral, Function literals),
1621
$(A spec/function.html#closures, Closures),
1722
$(A spec/function.html#variadic, Typesafe variadic arguments),
1823
$(A lazy-evaluation.html, Lazy function argument evaluation),
19-
$(A spec/function.html#interpretation, Compile time function evaluation),
20-
$(A spec/function.html#pseudo-member, Uniform Function Call Syntax),
21-
$(A spec/attribute.html#UserDefinedAttribute, User-Defined Attributes)
24+
$(A spec/function.html#pseudo-member, Uniform Function Call Syntax)
2225
),
2326
Arrays
2427
$(ITEMIZE
@@ -28,22 +31,21 @@ $(ITEMIZE
2831
$(A spec/arrays.html#slicing, Array slicing),
2932
$(A spec/arrays.html#bounds, Array bounds checking),
3033
$(A spec/expression.html#ArrayLiteral, Array literals),
31-
$(A spec/arrays.html#associative, Associative arrays),
32-
$(A spec/statement.html#SwitchStatement, String switches),
33-
$(A spec/declaration.html#alias, Aliases)
34+
$(A spec/statement.html#string-switch, String switches),
35+
$(A spec/arrays.html#associative, Associative arrays)
3436
),
3537
OOP
3638
$(ITEMIZE
37-
Object Orientation,
39+
$(A spec/class.html, Object Orientation),
3840
$(A spec/interface.html, Interfaces),
3941
Single inheritance of implementation/multiple inheritance of interfaces,
4042
$(A spec/operatoroverloading.html, Operator overloading),
4143
$(A spec/module.html, Modules),
4244
No built-in dynamic class loading,
4345
$(A spec/class.html#nested, Nested classes),
4446
$(A spec/class.html#nested, Inner (adaptor) classes),
45-
$(A spec/function.html, Covariant return types),
46-
$(A spec/property.html#classproperties, Properties)
47+
$(A spec/function.html#covariance, Covariant return types),
48+
$(A spec/function.html#property-functions, Properties)
4749
),
4850
Performance
4951
$(ITEMIZE
@@ -54,43 +56,77 @@ $(ITEMIZE
5456
Independent of VM,
5557
Direct native code gen
5658
),
57-
$(A spec/template.html, Generic Programming)
59+
Generic Programming
5860
$(ITEMIZE
59-
Class Templates,
61+
$(A spec/declaration.html#AutoDeclaration, Implicit Type Inference),
62+
$(A spec/statement.html#ForeachStatement, `foreach`),
63+
$(MREF_ALTTEXT Ranges, std,range),
64+
$(MREF_ALTTEXT Algorithms, std,algorithm),
65+
$(A spec/declaration.html#alias, Aliases),
66+
$(A spec/template.html, Templates)
67+
$(ITEMIZE
68+
$(A spec/template.html#aggregate_templates, Aggregate Templates),
6069
$(A spec/template.html#function-templates, Function Templates),
61-
Implicit Function Template Instantiation,
62-
Partial and Explicit Specialization,
63-
Value Template Parameters,
64-
Template Template Parameters,
70+
$(A spec/template.html#ifti, Implicit Function Template Instantiation),
71+
$(A spec/template.html#parameters_specialization, Partial and Explicit Template Specialization),
72+
$(A spec/template.html#template_value_parameter, Value Template Parameters),
73+
$(A spec/template.html#aliasparameters, Alias Template Parameters),
6574
$(A articles/variadic-function-templates.html, Variadic Template Parameters),
66-
$(A concepts.html, Template Constraints),
75+
$(A articles/constraints.html, Template Constraints)
76+
)
77+
$(A spec/expression.html#IsExpression, `is` expressions),
78+
$(A spec/type.html#Typeof, `typeof`)
79+
),
80+
Metaprogramming
81+
$(ITEMIZE
82+
$(A spec/function.html#interpretation, Compile Time Function Evaluation),
6783
$(A spec/template-mixin.html, Template Mixins),
68-
$(A spec/version.html#staticif, static if),
69-
$(A spec/expression.html#IsExpression, expressions),
70-
$(A spec/type.html#Typeof, typeof),
71-
$(A spec/statement.html#ForeachStatement, foreach),
72-
$(A spec/declaration.html#AutoDeclaration, Implicit Type Inference)
84+
$(A articles/mixin.html, String Mixins),
85+
$(A spec/version.html#staticif, `static if`),
86+
$(A spec/version.html#staticforeach, `static foreach`)
7387
),
7488
Reliability
7589
$(ITEMIZE
7690
$(A spec/contracts.html, Contract Programming),
7791
$(A spec/unittest.html, Unit testing),
92+
$(A spec/const3.html, Immutable data),
93+
$(A spec/function.html#pure-functions, Pure functions),
7894
$(A spec/module.html#staticorder, Static construction order),
79-
$(A spec/statement.html#DeclarationStatement, Guaranteed initialization),
80-
$(A https://wiki.dlang.org/Memory_Management#RAII_.28Resource_Acquisition_Is_Initialization.29, RAII (automatic destructors)),
95+
$(A spec/declaration.html#initialization, Initialization by default),
96+
$(A spec/glossary.html#raii, RAII (implicit destructor calls)),
8197
$(A spec/statement.html#TryStatement, Exception handling),
8298
$(A spec/statement.html#ScopeGuardStatement, Scope guards),
83-
$(A spec/statement.html#TryStatement, try-catch-finally blocks),
99+
$(A spec/statement.html#TryStatement, `try`-`catch`-`finally` blocks),
100+
$(A articles/safed.html, Memory-safe subset)
101+
),
102+
Concurrency & Parallelism
103+
$(ITEMIZE
104+
$(MREF_ALTTEXT Concurrency, std,concurrency),
105+
$(MREF_ALTTEXT Fibers, core,thread,fiber),
106+
$(REF parallel, std,parallelism),
107+
$(A articles/migrate-to-shared.html, Thread Local Storage by default),
108+
$(A spec/const3.html#shared, Shared data),
84109
$(A spec/statement.html#SynchronizedStatement, Thread synchronization primitives)
85110
),
111+
Types
112+
$(ITEMIZE
113+
$(A spec/struct.html, Structs and Unions),
114+
$(A spec/enum.html, Enumerated types),
115+
$(A spec/float.html, 80 bit floating point),
116+
$(A phobos/std_complex.html, Complex and Imaginary),
117+
$(A spec/type.html#pointers, Pointers),
118+
$(REF_ALTTEXT Tuples, Tuple, std,typecons),
119+
$(A spec/struct.html#alias-this, Alias This)
120+
),
86121
Compatibility
87122
$(ITEMIZE
88123
C-like syntax,
89-
$(A spec/enum.html, Enumerated types),
90124
$(A spec/type.html, Support for all C types),
91-
$(A spec/type.html, 80 bit floating point),
92-
$(A phobos/std_complex.html, Complex and Imaginary),
125+
$(A spec/statement.html#NonEmptyStatementNoCaseNoDefault,
126+
`if`, `while`, `do`, `for`, `switch`, `goto`),
93127
$(A spec/attribute.html#linkage, Direct access to C),
128+
$(A spec/importc.html, Import C code),
129+
$(A spec/betterc.html, Better C subset),
94130
Use existing debuggers,
95131
$(A spec/attribute.html#align, Struct member alignment control),
96132
Generates standard object files,
@@ -100,7 +136,10 @@ $(ITEMIZE
100136
$(ITEMIZE
101137
$(A spec/version.html, Conditional compilation),
102138
$(A spec/lex.html, Unicode source text),
103-
$(A spec/ddoc.html, Documentation comments)
139+
$(A spec/statement.html#with-statement, `with` statement),
140+
$(A spec/attribute.html#UserDefinedAttribute, User-Defined Attributes),
141+
$(A spec/ddoc.html, Documentation comments),
142+
$(A spec/ddoc.html#using_ddoc_to_generate_examples, Documented unit tests)
104143
)
105144
)
106145

0 commit comments

Comments
 (0)