Programming in D – Tutorial and Reference
Ali Çehreli

Other D Resources

   

Index

, (comma), case value list   
, (comma), function parameter list   
, (comma), operator   
, (comma), output   
, (comma), template parameter list   
!, logical not   
!, template instance   
!=   1  2
$, formatted output   
$, slice length   
%   1  2
%(   
%)   
%-(   
%1$   
%=   1  2
%|   
%A   
%a   
%b   
%c   
%d, input   
%d, output   
%E   
%e   
%F   
%f, input   
%f, output   
%G   
%g   
%o, input   
%o, output   
%s, input   
%s, output   
%s, with whitespace   
%X   
%x, input   
%x, output   
%,   
&, address of   1  2  3
&, bitwise and   1  2
&, function address   
&, object delegate   
&&   
&&, short-circuit   
&=   
>, greater than   1  2
>, output redirect   
>>   1  2
>>>   1  2
>>>=   
>>=   
>=   1  2
<, input redirect   
<, less than   1  2
<<   1  2
<<=   
<=   1  2
"   
'   
()   1  2
*, formatted output   
*, multiplication   1  2
*, pointee access   1  2
*, pointer definition   
*/   
*=   1  2
+, addition   1  2
+, plus sign   1  2
++, post-increment   1  2
++, pre-increment   1  2
+/   
+=   1  2
-, negation   1  2
-, subtraction   1  2
--, post-decrement   1  2
--, pre-decrement   1  2
-=   1  2
., member   
., pointer   
.., case value range   
.., number range   
.., slice element range   
..., function parameter   
..., template parameter   
/   1  2
/*   
/+   
//   
/=   1  2
1-bit integer   
:, associative array   
:, import   
:, inheritance   
:, label   
=   1  2
= void   
=>   
=>, operator precedence   
==   1  2
?:   
?:, short-circuit   
@   
[]   1  2
\   
\&   
\U   
\u   
^, bitwise exclusive or   1  2
^, logical exclusive or   
^=   
^^   1  2
^^=   1  2
`   
{}, construction   
|   1  2  3
|, stream pipe   
|=   
||   
||, short-circuit   
~, bitwise complement   1  2
~, concatenation   1  2
~=   1  2
A
AA   
abstract   
abstraction   
access protection   
add element, array   
addition   
adds   
addu   
Algebraic, std.variant   
algorithm   
alias   
alias, template parameter   
alias this   
AliasSeq, std.meta   
align   
alignment   
.alignof   
all, version   
allMembers   
amap   
and, bitwise operator   
and, logical operator   
anonymous function   
anonymous union   
append, array   
appender, std.array   
_argptr   
argument   
argument, default   
_arguments   
arithmetic conversion   
arithmetic operation   
arithmetic, pointer   
array   1  2
array, cost of enum   
array, uninitialized   
array-wise operation   
ASCII   
asm   
assert   
assert vs. enforce   
assertNotThrown, std.exception   
assertThrown, std.exception   
assignment   
assignment, array   
assignment, class   
assignment, operation result   1  2
assignment operator   
assignment, struct   
associative array   
associativity, operator   
assumeUnique, std.exception   
asyncBuf   
asynchronous I/O, fiber   
atomic operation   
atomicOp, core.atomic   
attribute inference, @safe   
attribute inference, nothrow   
attribute inference, pure   
auto function   
auto ref, parameter   
auto ref, return type   
auto, return type   
auto, variable   
automatic constructor   
automatic type conversion   1  2
B
back   1  2
BidirectionalRange   
binary operator   
binary system   
binding   
bit   1  2
bit operation   
BlkAttr   
body   1  2
bool   
bool, 1-bit integer   
bool, automatic conversion   
bool, opCast   
break   
bswap, std.bitop   
bug, causes of   
building the program   
.byKey   
.byKey, foreach   
.byKeyValue   
.byKeyValue, foreach   
byte   1  2
.byValue   
.byValue, foreach   
C
C   
C++   
C-style struct initialization   
call, Fiber   
call stack   
.capacity   
cas, core.atomic   
case   
case, goto   
cast   
catch   
chain, std.range   
chaining, function call   
chaining, operator   
char   1  2
char[]   
character   
Checked   
checked format string   
checkedint   
class   
class, foreach   
class, is expression   
class, nested in class   
class, nested in function   
class template   
.classinfo   
classInstanceAlignment   
classInstanceSize   
.clear   
closure   1  2
cmp, std.algorithm   
code bloat   
code duplication   
code page   
code point   
code unit   
collateral exception   
combined code point   
comma operator   
command line options   
comment   1  2
common type   
compilation   
compilation error   
compile time function execution   
compile-time foreach   
compile-time polymorphism   
compiler   
compiler installation   
compiler switch   
complement, bitwise operator   
concatenation, array   
concatenation, string   
concurrency, data sharing   
concurrency, message passing   
concurrency vs. parallelism   
conditional compilation   
conditional operator   1  2
const   
const, is expression   
const, member function   
const, parameter   
const ref   
const-correct   
constant, manifest   
constant time access   
constraint, template   
construction   
construction, by name   
construction, emplace   
construction, type conversion   
constructor   
constructor qualifier   
container   1  2
context   1  2
context switching   
continue   
contract inheritance   
contract programming   1  2
control character   1  2
convenience function   
conversion, type   
cooperative multitasking   
copy, array   1  2
copy, class   
copy constructor   
copy, parameter   
copy, std.algorithm   
copy, struct   
core   
core.checkedint   
coroutine   
counter, foreach   
counter, loop   
CPU   
CPU bound   
CTFE   
__ctfe   
cycle, std.range   
D
D   
-d, compiler switch   
data sharing concurrency   
data structure   
__DATE__   
dchar   1  2
dchar, string range   1  2
dchar[]   
-de, compiler switch   
deadlock   
debug   
-debug, compiler switch   
decoding, automatic   
decrement   
decrement, post   
deduction, type   
default argument   
default constructor   
default, goto   
default template parameter   
default value, member   
default value, type   
delegate   
delegate, foreach   
delegate, is expression   
delegate, member function   
delegate, message passing   
delete   
delimited string literal   
demangle   
deprecated   
designated initializer   
destroy   1  2
destruction   
destructor   
destructor, execution   
destructor, mixin   
.dig   
DIP   
-dip1000   
@disable   
discriminated union   
division   
dmd   
do, contract programming   
do-while   
double   1  2
dstring   1  2
duck typing   
.dup   1  2
-dw, compiler switch   
dynamic array   
E
each, std.algorithm   
editor, text   
element   
element one past the end   
ElementEncodingType   
elements, operation on all   
ElementType   
else   
else if   
emplace   
emplace, class   
emplace, struct   
empty   1  2
encapsulation   
encoding, unicode   
endian, std.system   
enforce   
enforce vs. assert   
enforce vs. in   
enum   1  2
enum, array cost   
enum, is expression   
enumerate, std.range   
EnumMembers, std.traits   
environment variable   
eof   
eponymous template   
equals, logical operator   
erase, const   
Error   
error, compilation   
error, kinds of   
Exception   
exception   
exception, concurrency   
exception, fiber   
exception, parallelism   
exclusive or, bitwise operator   
EXEC, Fiber.State   
executeInNewThread   
executeShell, std.process   
.expand   
experimental.checkedint   
explicit type conversion   
export   1  2
expression   
expression, lvalue vs rvalue   
expression-based contracts   
extern   
extern()   
F
factory   
fallthrough, case   
fiber   
Fiber, core.thread   
fiber function   
File   
file   
.file   
file import   
__FILE__   
__FILE_FULL_PATH__   
filter, std.algorithm   1  2
final   1  2
final switch   
finalization   
finalizer versus destructor   
finally   
findSplit, std.algorithm   
fixed-length array   
fixed-length array, conversion to slice   
flag, bit   
flags, output   
float   1  2
floating point   
flush, std.stdio   
fold, std.algorithm   1  2
for   
foreach   
foreach, compile-time   
foreach, parallel   
foreach, static   
foreach, user defined type   
foreach_reverse   1  2
format, std.string   
formatted input   
formatted output   
formattedRead   
formattedWrite, std.format   
ForwardRange   
front   1  2
.funcptr   
function   1  2
function, anonymous   
function call chaining   
function inlining   
function, is expression   
function, lambda   
function literal   
function, member   
function, nested   
function overloading   
function parameter   
function pointer   
function pointer, delegate   
function template   
__FUNCTION__   
fundamental type   
G
garbage collector   
GC   
GC.addRange   
GC.addRoot   
GC.calloc   
GC.collect   
GC.disable   
GC.enable   
GC.extend   
GC.free   
GC.realloc   
GC.removeRange   
gdc   
generate, std.range   
Generator, std.concurrency   
.get   
getAttributes   
getHash   
getMember   
getopt, std.getopt   
goto   
goto case   1  2
goto default   1  2
greater than, logical operator   
greater than or equal to, logical operator   
green thread   
__gshared   
H
has-a   
hasAssignableElements   
hash table   
hasLength   
hasLvalueElements   
hasMobileElements   
hasSlicing   
hasSwappableElements   
hasUDA, std.traits   
hello world   
heredoc   
hexadecimal system   
hiding, name   
hierarchy   
HOLD, Fiber.State   
I
I/O bound   
IDE   
.idup   
if   
if, static   
if, template constraint   
immutable   1  2
immutable, concurrency   
immutable, is expression   
immutable, parameter   
implicit type conversion   1  2
import   
import, file   
import, local   1  2
import, public   
import, selective   
import, string   
!in   
in, associative array   
in, contract   1  2
in, immutability   
in, inherited   
in, operator   1  2
in, operator overloading   
in, parameter   
in, parameter lifetime   
in ref   
in vs. enforce   
increment   
increment, post   
index   
inference, @safe attribute   
inference, nothrow attribute   
inference, pure attribute   
infinite loop   
infinite range   
.infinity   
.info   
inheritance   
inheritance, contract   
inheritance, single   
.init   1  2
.init, clearing a variable   
initial value   
initialization   
initialization, array   
initialization, immutability   
inline   
-inline, compiler switch   
inout, member function   
inout, parameter   
inout, return type   
input   
input, bool   
input, formatted   
InputRange   
inputRangeObject   
installation, compiler   
instantiation, template   
int   
integer   
integer promotion   
interface   
interface, is expression   
interface template   
interpreter   
invariant   
iota, std.range   
!is   1  2
is, expression   
is, operator   1  2
is-a   
isBidirectionalRange   
isForwardRange   
isInfinite   
isInputRange   
isNan, std.math   
isOutputRange   
isRandomAccessRange   
isRef   
J
-J, compiler switch   
K
.keys   
keyword   
keyword, special   
L
L, literal suffix   
label   
lambda   
lazy   
lazy evaluation   
lazy parameter as delegate   
lazy, parameter lifetime   
lazy range   
lazy variadic functions   
ldc   
left shift, bitwise operator   
left-associative   
.length   1  2
length, BidirectionalRange   
length, string   
less than, logical operator   
less than or equal to, logical operator   
lexicographical   
library   
lifetime   
.line   
__LINE__   
linkage   
linker   
LinkTerminated   
literal   
literal, character   
literal, function   
literal, string   1  2
literal, struct   
literal, token string   
local import   1  2
local state   
local variable   
locate   
lock   
logical and operator   
logical expression   
logical or operator   
long   
loop counter   
loop, do-while   
loop, for   
loop, foreach   
loop, foreach_reverse   
loop, infinite   
loop label   
loop, unconditional   
loop, while   
LU, literal suffix   
lvalue   1  2
M
-m32, compiler switch   
M:N, threading   
machine code   
macro   
magic constant   
MailboxFull   
main   
mangle, core.demangle   
mangle, pragma   
mangling, name   
manifest constant   
map, parallel   
map, std.algorithm   
map, vs. each   
mask, bit   
.max   
member function   
member function delegate   
member function pointer   
member function template   
memory   
memory access, pointer   
memory block attribute   
memory management   
memset, core.stdc.string   
message   
message passing concurrency   
MessageMismatch   
meta programming   
microprocessor   
.min   
.min, floating point   
.min_normal   
mixin   
-mixin, compiler switch   
mode, file   
module   
module constructor, shared   
module constructor, thread-local   
module variable   
__MODULE__   
modulus   
move, std.algorithm   
moveAt   
moveBack   
moveFront   
.msg   
muls   
multi-dimensional array   
multi-dimensional operator overloading   
multiplication   
mulu   
N
name hiding   
name mangling   1  2
name scope   
name space, mixin   
name space, template   
named template constraint   
namespace, C++   
.nan   1  2
negation   
negs   
nested definition   
new   1  2
.new   
.next   
@nogc   
none, version   
not equals, logical operator   
not, logical operator   
nothrow   
NRVO   
null   
null, class   
number range   
O
-O, compiler switch   
Object   1  2
object, class   
object delegate   
object oriented programming   
object, struct   
Objective-C   
.offsetof   
OnCrowding   
one-bit integer   
OOP   
opApply   
opApplyReverse   
opAssign   1  2
opBinary   
opBinaryRight   
opCall   
opCall, static   
opCast   
opCast!bool   
opCmp   1  2
opDispatch   
opDollar   
opDollar template   
opEquals   1  2
operator associativity   
operator, binary   
operator chaining   
operator overloading   
operator overloading, mixin   
operator overloading, multi-dimensional   
operator precedence   
operator, unary   
opIndex   1  2
opIndex template   
opIndexAssign   
opIndexAssign template   
opIndexOpAssign   
opIndexOpAssign template   
opIndexUnary   
opOpAssign   
opSlice   
opSlice template   
opSliceAssign   
opSliceOpAssign   
opSliceUnary   
optimization, compiler   
opUnary   
or, bitwise operator   
or, logical operator   
out, contract   1  2
out, inherited   
out, parameter   
out, parameter lifetime   
.outer, class type   
.outer, void*   
OutOfMemoryError   
output, formatted   
OutputRange   
outputRangeObject   
overflow   
overflow, floating point   
overloading, function   
overloading, operator   1  2
override   
owner   
OwnerTerminated   
ownerTid   
P
package, definition   
package import   
package, protection   
package.d   
padding   
parallel   
parallelism   
parallelism vs. concurrency   
parameter   1  2
parameter, auto ref   
parameter, const   
parameter, const ref   
parameter, const vs. immutable   
parameter, immutable   
parameter, in ref   
parameter, lifetime   
parameter, template   1  2
parameter, variable number of   
__parameters, is expression   
Pascal   
pass-by copy   
pass-by reference   
Phobos   
Phobos, library   
plus sign   
pointer   1  2
pointer, array element   
pointer, delegate context   
pointer, function   
pointer, member function   
polymorphism, compile-time   
polymorphism, run-time   1  2
popBack   1  2
popFront   1  2
popFrontN, std.range   
positional parameter, output   
post-decrement   
post-increment   
postblit   
postcondition   1  2
postcondition, inherited   
power of   
pragma   
precedence, operator   
precision   
precision, output   
precondition   1  2
precondition, inherited   
predicate   
preemptive multitasking, vs. cooperative multitasking   
__PRETTY_FUNCTION__   
-preview=in, compiler switch   
PriorityMessageException   
prioritySend   
private   
program environment   
program stack   
programming language   
promotion, integer   
property   
@property   
protected   
protection   
proxy   
.ptr, array element   
.ptr, delegate context   
public   
public import   
pure   
put   
Q
q""   
q{}   
qualifier, constructor   
qualifier, type   
R
RAII   
RandomAccessRange   
randomSample, std.random   
randomShuffle, std.random   
range   1  2
range, case   
range, foreach   
read, bool   
read, character   
readf   
readln   
real   1  2
receiveOnly   
receiveTimeout   
recursion   1  2
recursive type   
redirect, stream   
reduce, parallel   
reduce, std.algorithm   
ref const   
ref, foreach   
ref in   
ref, parameter   
ref, parameter lifetime   
ref, return type   
refactor   
reference, concept   
reference, sealed   
reference type   
reference type, member   
register, concurrency   
register, CPU   
.rehash   
-release, compiler switch   1  2  3
remainder   
remove, array   
.remove, associative array   
renamed import   
replicate, std.array   
representation, std.string   
.reserve   
reset, Fiber   
retro, std.range   1  2
return, is expression   
return, parameter   
return, statement   
return type, operator   
return value   
reverse   
right shift, bitwise operator   
right-associative   
run-time polymorphism   
rvalue   
S
@safe   
save   1  2
scalar   
scope   
scope, unassociated   
scope(exit)   
scope(failure)   
scope(success)   
scoped   
sealed reference   
segmentation fault   
selective import   
send   
separator   
setMaxMailboxSize   
shared   
shared, is expression   
shared, parameter   
shared static ~this   
shared static this   
shared static this, immutability   
short   
short-circuit evaluation   
shortcut syntax, template   
side effect   
sign bit   
sign extension   
single inheritance   
single-element tuple template parameter   
sink   
size_t   
.sizeof   
.sizeof, associative array   
.sizeof, class   
slice   
slice, as InputRange   
slice, as OutputRange   
slice from pointer   
sort   
source file   
spawn   
spawnLinked   
special keyword   
special token   
specialization, template   
specifier, character   
spinForce   
stack frame   
stack unwinding   
standard input   
standard output   
startaddress   
State, Fiber   
.state, Fiber   
statement   
static ~this, module   
static ~this, shared   
static ~this, struct   
static array   
static array, conversion to slice   
static assert   1  2
static class   
static foreach   
static if   
static, member   
static, member function   
static, nested definition   
static opCall   
static struct   
static this, module   
static this, shared   
static this, struct   
std   
std.algorithm   
std.file   
std.range   
std.traits   
std.uni   
stderr   
stdin   
stdout   
stomping   
StopWatch, std.datetime.stopwatch   
stride, std.range   
string   1  2
string, as range   
string import   
string literal   
string mixin   
.stringof   
strip   
struct   
struct, foreach   
struct, is expression   
struct, nested   
struct template   
subclass   
subs   
subtraction   
subu   
sum, std.algorithm   
super, construction   
super, is expression   
super, member access   
superclass   
swapFront, std.algorithm   
switch   
symbol   
synchronized   
System   
@system   
T
take, std.range   
Task   
task   
TaskPool   
TDD   
template   1  2
template constraint   
template mixin   
TERM, Fiber.State   
ternary operator   1  2
test   
test driven development   
text editor   
text file import   
~this   
this, constructor   
this, member access   
this, shared static   
~this, shared static   
this, static, module   
~this, static, module   
this, static, struct   
~this, static, struct   
this, template parameter   1  2
this(this)   
thisTid   
thread   1  2
thread, green   
thread id   
thread performance   1  2
Thread.sleep   
thread_joinAll   
throw   1  2
Throwable   
Tid   
__TIME__   
__TIMESTAMP__   
to, std.conv   
toHash   
token, special   
token string literal   
toString   1  2
toString, delegate   
toString, OutputRange   
totalCPUs   
traits   
__traits   1  2
transistor   
transitive, immutability   
truncation   
@trusted   
try   
tuple   
Tuple, std.typecons   
tuple template parameter   
tuple template parameter, single-element   
.tupleof   
type   
type constructor   
type conversion   
type conversion, automatic   
type conversion, constructor   
type conversion, explicit   
type conversion, implicit   
type conversion, opCast   
type deduction   
type qualifier   
type, reference   
type template parameter   
type trait   
typedef   
typeid   
TypeInfo   
TypeInfo_Class   
typeof   1  2
typeof(return)   
typeof(super)   
typeof(this), copy constructor   
typeof(this), templates   
TypeTuple, std.typetuple   
U
U, literal suffix   
ubyte   
UDA   
UFCS   
uint   
UL, literal suffix   
ulong   
unary operator   
unconditional loop   
undefined behavior   
underflow   
unicode   
uninitialized array   
union   
union, is expression   
union template   
unit testing   
unittest   
-unittest, compiler switch   
universal function call syntax   
unordered   
unregister   
unroll   
unsigned right shift, bitwise operator   
user defined attributes   
user defined constructor   
user defined type   1  2
ushort   
UTF-8   
UTF-16   
UTF-32   
V
value template parameter   
value type   
.values   
variable   
variable, class   
variable, const   
variable, immutable   
variable, lifetime   
variable, local   
variable, module   
variable, reference   
variadic function   
variadic function, lazy   
variadic template   
Variant, concurrency   
Variant, std.variant   
__vector   
__VENDOR__   
version   
-version, compiler switch   
__VERSION__   
vibe.d   
viral, immutability   
virtual function   
void, function   
void*   1  2
void[]   
volatile   
Voldemort   
vtbl   
W
wchar   1  2
wchar[]   
while   
whitespace   
width, output   
Windows   
with   
work unit size   
worker   
workForce   
wrap   
write   
writeln   
wstring   1  2
wysiwyg   
X
xor, bitwise operator   
xor, logical operator   
Y
yield, Fiber   
yield, std.concurrency   
yieldAndThrow, Fiber   
yieldForce