<s>
D	B-Application
,	O
also	O
known	O
as	O
dlang	B-Application
,	O
is	O
a	O
multi-paradigm	O
system	B-Language
programming	I-Language
language	I-Language
created	O
by	O
Walter	O
Bright	O
at	O
Digital	B-Language
Mars	I-Language
and	O
released	O
in	O
2001	O
.	O
</s>
<s>
Though	O
it	O
originated	O
as	O
a	O
re-engineering	O
of	O
C++	B-Language
,	O
D	B-Application
is	O
a	O
profoundly	O
different	O
language	O
—	O
features	O
of	O
D	B-Application
can	O
be	O
considered	O
streamlined	O
and	O
expanded-upon	O
ideas	O
from	O
C++	B-Language
,	O
however	O
D	B-Application
also	O
draws	O
inspiration	O
from	O
other	O
high-level	O
programming	O
languages	O
,	O
notably	O
Java	B-Language
,	O
Python	B-Language
,	O
Ruby	B-Language
,	O
C#	B-Application
,	O
and	O
Eiffel	B-Language
.	O
</s>
<s>
D	B-Application
combines	O
the	O
performance	O
and	O
safety	O
of	O
compiled	B-Language
languages	I-Language
with	O
the	O
expressive	B-Language
power	I-Language
of	O
modern	O
dynamic	B-Language
and	O
functional	B-Language
programming	I-Language
languages	I-Language
.	O
</s>
<s>
Idiomatic	O
D	B-Application
code	O
is	O
commonly	O
as	O
fast	O
as	O
equivalent	O
C++	B-Language
code	I-Language
,	O
while	O
also	O
being	O
shorter	O
.	O
</s>
<s>
The	O
language	O
as	O
a	O
whole	O
is	O
not	O
memory-safe	B-Application
but	O
includes	O
optional	O
attributes	O
designed	O
to	O
guarantee	O
memory	B-Application
safety	I-Application
of	O
either	O
subsets	O
of	O
or	O
the	O
whole	O
program	O
.	O
</s>
<s>
Type	O
inference	O
,	O
automatic	B-General_Concept
memory	I-General_Concept
management	I-General_Concept
and	O
syntactic	O
sugar	O
for	O
common	O
types	O
allow	O
faster	O
development	O
,	O
while	O
bounds	B-Data_Structure
checking	I-Data_Structure
and	O
design	B-Application
by	I-Application
contract	I-Application
find	O
bugs	O
earlier	O
at	O
runtime	B-Library
,	O
and	O
a	O
concurrency-aware	O
type	O
system	O
catches	O
bugs	O
at	O
compile	B-Language
time	O
.	O
</s>
<s>
D	B-Application
was	O
designed	O
with	O
lessons	O
learned	O
from	O
practical	O
C++	B-Language
usage	O
,	O
rather	O
than	O
from	O
a	O
purely	O
theoretical	O
perspective	O
.	O
</s>
<s>
Although	O
the	O
language	O
uses	O
many	O
C	B-Language
and	O
C++	B-Language
concepts	O
,	O
it	O
also	O
discards	O
some	O
,	O
or	O
uses	O
different	O
approaches	O
(	O
and	O
syntax	B-Application
)	O
to	O
achieve	O
some	O
goals	O
.	O
</s>
<s>
As	O
such	O
,	O
it	O
is	O
not	O
source	B-General_Concept
compatible	I-General_Concept
(	O
nor	O
does	O
it	O
aim	O
to	O
be	O
)	O
with	O
C	B-Language
and	O
C++	B-Language
source	O
code	O
in	O
general	O
(	O
some	O
simpler	O
code	O
bases	O
from	O
these	O
languages	O
might	O
by	O
luck	O
work	O
with	O
D	B-Application
,	O
or	O
require	O
some	O
porting	O
)	O
.	O
</s>
<s>
D	B-Application
has	O
,	O
however	O
,	O
been	O
constrained	O
in	O
its	O
design	O
by	O
the	O
rule	O
that	O
any	O
code	O
that	O
was	O
legal	O
in	O
both	O
C	B-Language
and	O
D	B-Application
should	O
behave	O
in	O
the	O
same	O
way	O
.	O
</s>
<s>
D	B-Application
gained	O
some	O
features	O
before	O
C++	B-Language
,	O
such	O
as	O
closures	B-Language
,	O
anonymous	B-General_Concept
functions	I-General_Concept
,	O
compile-time	O
function	O
execution	O
,	O
ranges	O
,	O
built-in	O
container	O
iteration	O
concepts	O
and	O
type	O
inference	O
.	O
</s>
<s>
D	B-Application
adds	O
to	O
the	O
functionality	O
of	O
C++	B-Language
by	O
also	O
implementing	O
design	B-Application
by	I-Application
contract	I-Application
,	O
unit	O
testing	O
,	O
true	O
modules	B-Architecture
,	O
garbage	B-General_Concept
collection	I-General_Concept
,	O
first	O
class	O
arrays	O
,	O
associative	B-Application
arrays	I-Application
,	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
,	O
array	O
slicing	O
,	O
nested	O
functions	O
,	O
lazy	O
evaluation	O
,	O
scoped	O
(	O
deferred	O
)	O
code	O
execution	O
,	O
and	O
a	O
re-engineered	O
template	O
syntax	B-Application
.	O
</s>
<s>
C++	B-Language
multiple	B-Application
inheritance	I-Application
was	O
replaced	O
by	O
Java-style	O
single	B-Application
inheritance	I-Application
with	O
interfaces	B-Language
and	O
mixins	B-Language
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
D	B-Application
's	O
declaration	O
,	O
statement	O
and	O
expression	O
syntax	B-Application
closely	O
matches	O
that	O
of	O
C++	B-Language
.	O
</s>
<s>
D	B-Application
retains	O
C++'s	O
ability	O
to	O
perform	O
low-level	B-Language
programming	I-Language
including	O
inline	B-Language
assembler	I-Language
,	O
which	O
typifies	O
the	O
differences	O
between	O
D	B-Application
and	O
application	O
languages	O
like	O
Java	B-Language
and	O
C#	B-Application
.	O
</s>
<s>
Inline	B-Language
assembler	I-Language
lets	O
programmers	O
enter	O
machine-specific	O
assembly	B-Language
code	I-Language
within	O
standard	O
D	B-Application
code	O
,	O
a	O
method	O
used	O
by	O
system	O
programmers	O
to	O
access	O
the	O
low-level	B-Language
features	O
of	O
the	O
processor	B-General_Concept
needed	O
to	O
run	O
programs	O
that	O
interface	O
directly	O
with	O
the	O
underlying	O
hardware	B-Architecture
,	O
such	O
as	O
operating	B-General_Concept
systems	I-General_Concept
and	O
device	B-Application
drivers	I-Application
,	O
as	O
well	O
as	O
writing	O
high-performance	O
code	O
(	O
i.e.	O
</s>
<s>
using	O
vector	O
extensions	O
,	O
SIMD	B-Device
)	O
that	O
is	O
hard	O
to	O
generate	O
by	O
the	O
compiler	B-Language
automatically	O
.	O
</s>
<s>
D	B-Application
supports	O
function	B-Language
overloading	I-Language
and	O
operator	O
overloading	O
,	O
as	O
well	O
as	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
and	O
associative	B-Application
arrays	I-Application
by	O
default	O
.	O
</s>
<s>
import	O
some	O
module	B-Architecture
or	O
part	O
of	O
it	O
inside	O
a	O
function	O
,	O
class	O
or	O
unittest	O
only	O
)	O
.	O
</s>
<s>
D	B-Application
has	O
built-in	O
support	O
for	O
documentation	O
comments	O
,	O
allowing	O
automatic	B-Protocol
documentation	I-Protocol
generation	I-Protocol
.	O
</s>
<s>
In	O
D	B-Application
,	O
text	O
character	O
strings	O
are	O
just	O
arrays	O
of	O
characters	O
,	O
and	O
arrays	O
in	O
D	B-Application
are	O
bounds-checked	O
,	O
unlike	O
those	O
in	O
C++	B-Language
.	O
</s>
<s>
D	B-Application
has	O
first	O
class	O
types	O
for	O
complex	O
and	O
imaginary	O
numbers	O
,	O
and	O
evaluates	O
expressions	O
involving	O
such	O
types	O
,	O
efficiently	O
.	O
</s>
<s>
D	B-Application
supports	O
five	O
main	O
programming	O
paradigms	O
:	O
</s>
<s>
Imperative	B-Application
programming	I-Application
in	O
D	B-Application
is	O
almost	O
identical	O
to	O
that	O
in	O
C	B-Language
.	O
Functions	O
,	O
data	O
,	O
statements	O
,	O
declarations	O
and	O
expressions	O
work	O
just	O
as	O
they	O
do	O
in	O
C	B-Language
,	O
and	O
the	O
C	B-Language
runtime	B-Library
library	I-Library
may	O
be	O
accessed	O
directly	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
some	O
notable	O
differences	O
between	O
D	B-Application
and	O
C	B-Language
in	O
the	O
area	O
of	O
imperative	B-Application
programming	I-Application
include	O
D	B-Application
's	O
foreach	O
loop	O
construct	O
,	O
which	O
allows	O
looping	O
over	O
a	O
collection	O
,	O
and	O
nested	O
functions	O
,	O
which	O
are	O
functions	O
that	O
are	O
declared	O
inside	O
another	O
and	O
may	O
access	O
the	O
enclosing	O
function	O
's	O
local	O
variables	O
.	O
</s>
<s>
Object-oriented	B-Language
programming	I-Language
in	O
D	B-Application
is	O
based	O
on	O
a	O
single	B-Application
inheritance	I-Application
hierarchy	O
,	O
with	O
all	O
classes	O
derived	O
from	O
class	O
Object	O
.	O
</s>
<s>
D	B-Application
does	O
not	O
support	O
multiple	B-Application
inheritance	I-Application
;	O
instead	O
,	O
it	O
uses	O
Java-style	O
interfaces	B-Language
,	O
which	O
are	O
comparable	O
to	O
C++'s	O
pure	O
abstract	O
classes	O
,	O
and	O
mixins	B-Language
,	O
which	O
separates	O
common	O
functionality	O
from	O
the	O
inheritance	O
hierarchy	O
.	O
</s>
<s>
D	B-Application
also	O
allows	O
the	O
defining	O
of	O
static	O
and	O
final	O
(	O
non-virtual	O
)	O
methods	O
in	O
interfaces	B-Language
.	O
</s>
<s>
Interfaces	B-Language
and	O
inheritance	O
in	O
D	B-Application
support	O
covariant	O
types	O
for	O
return	O
types	O
of	O
overridden	O
methods	O
.	O
</s>
<s>
D	B-Application
supports	O
type	O
forwarding	O
,	O
as	O
well	O
as	O
optional	O
custom	O
dynamic	B-Language
dispatch	O
.	O
</s>
<s>
Classes	O
(	O
and	O
interfaces	B-Language
)	O
in	O
D	B-Application
can	O
contain	O
invariants	B-Application
which	O
are	O
automatically	O
checked	O
before	O
and	O
after	O
entry	O
to	O
public	O
methods	O
,	O
in	O
accordance	O
with	O
the	O
design	B-Application
by	I-Application
contract	I-Application
methodology	O
.	O
</s>
<s>
Many	O
aspects	O
of	O
classes	O
(	O
and	O
structs	B-Application
)	O
can	O
be	O
introspected	B-Application
automatically	O
at	O
compile	B-Language
time	O
(	O
a	O
form	O
of	O
reflection	B-Language
using	O
type	O
traits	O
)	O
and	O
at	O
run	O
time	O
(	O
RTTI	O
/	O
TypeInfo	O
)	O
,	O
to	O
facilitate	O
generic	O
code	O
or	O
automatic	O
code	O
generation	O
(	O
usually	O
using	O
compile-time	O
techniques	O
)	O
.	O
</s>
<s>
D	B-Application
supports	O
functional	B-Language
programming	I-Language
features	O
such	O
as	O
function	B-General_Concept
literals	I-General_Concept
,	O
closures	B-Language
,	O
recursively-immutable	O
objects	O
and	O
the	O
use	O
of	O
higher-order	B-Language
functions	I-Language
.	O
</s>
<s>
There	O
are	O
two	O
syntaxes	B-Application
for	O
anonymous	B-General_Concept
functions	I-General_Concept
,	O
including	O
a	O
multiple-statement	O
form	O
and	O
a	O
"	O
shorthand	O
"	O
single-expression	O
notation	O
:	O
</s>
<s>
There	O
are	O
two	O
built-in	O
types	O
for	O
function	B-General_Concept
literals	I-General_Concept
,	O
function	O
,	O
which	O
is	O
simply	O
a	O
pointer	O
to	O
a	O
stack-allocated	O
function	O
,	O
and	O
delegate	O
,	O
which	O
also	O
includes	O
a	O
pointer	O
to	O
the	O
surrounding	O
environment	O
.	O
</s>
<s>
Type	O
inference	O
may	O
be	O
used	O
with	O
an	O
anonymous	B-General_Concept
function	I-General_Concept
,	O
in	O
which	O
case	O
the	O
compiler	B-Language
creates	O
a	O
delegate	O
unless	O
it	O
can	O
prove	O
that	O
an	O
environment	O
pointer	O
is	O
not	O
necessary	O
.	O
</s>
<s>
Likewise	O
,	O
to	O
implement	O
a	O
closure	B-Language
,	O
the	O
compiler	B-Language
places	O
enclosed	O
local	O
variables	O
on	O
the	O
heap	O
only	O
if	O
necessary	O
(	O
for	O
example	O
,	O
if	O
a	O
closure	B-Language
is	O
returned	O
by	O
another	O
function	O
,	O
and	O
exits	O
that	O
function	O
's	O
scope	O
)	O
.	O
</s>
<s>
When	O
using	O
type	O
inference	O
,	O
the	O
compiler	B-Language
will	O
also	O
add	O
attributes	O
such	O
as	O
pure	O
and	O
nothrow	O
to	O
a	O
function	O
's	O
type	O
,	O
if	O
it	O
can	O
prove	O
that	O
they	O
apply	O
.	O
</s>
<s>
Other	O
functional	B-Language
features	O
such	O
as	O
currying	B-Application
and	O
common	O
higher-order	B-Language
functions	I-Language
such	O
as	O
map	O
,	O
filter	B-Application
,	O
and	O
reduce	B-Application
are	O
available	O
through	O
the	O
standard	B-Library
library	I-Library
modules	B-Architecture
std.functional	O
and	O
std.algorithm	O
.	O
</s>
<s>
Alternatively	O
,	O
the	O
above	O
function	O
compositions	O
can	O
be	O
expressed	O
using	O
Uniform	O
function	O
call	O
syntax	B-Application
(	O
UFCS	O
)	O
for	O
more	O
natural	O
left-to-right	O
reading	O
:	O
</s>
<s>
Parallel	O
programming	O
concepts	O
are	O
implemented	O
in	O
the	O
library	B-Library
,	O
and	O
do	O
not	O
require	O
extra	O
support	O
from	O
the	O
compiler	B-Language
.	O
</s>
<s>
However	O
the	O
D	B-Application
type	O
system	O
and	O
compiler	B-Language
ensure	O
that	O
data	O
sharing	O
can	O
be	O
detected	O
and	O
managed	O
transparently	O
.	O
</s>
<s>
The	O
same	O
module	B-Architecture
also	O
supports	O
taskPool	O
which	O
can	O
be	O
used	O
for	O
dynamic	B-Language
creation	O
of	O
parallel	O
tasks	O
,	O
as	O
well	O
as	O
map-filter-reduce	O
and	O
fold	O
style	O
operations	O
on	O
ranges	O
(	O
and	O
arrays	O
)	O
,	O
which	O
is	O
useful	O
when	O
combined	O
with	O
functional	B-Language
operations	O
.	O
</s>
<s>
Concurrency	B-Operating_System
is	O
fully	O
implemented	O
in	O
the	O
library	B-Library
,	O
and	O
it	O
does	O
not	O
require	O
support	O
from	O
the	O
compiler	B-Language
.	O
</s>
<s>
The	O
use	O
of	O
D	B-Application
typing	O
system	O
does	O
help	O
ensure	O
memory	B-Application
safety	I-Application
.	O
</s>
<s>
Metaprogramming	B-Application
is	O
supported	O
through	O
templates	O
,	O
compile-time	O
function	O
execution	O
,	O
tuples	B-Application
,	O
and	O
string	O
mixins	B-Language
.	O
</s>
<s>
The	O
following	O
examples	O
demonstrate	O
some	O
of	O
D	B-Application
's	O
compile-time	O
features	O
.	O
</s>
<s>
Templates	O
in	O
D	B-Application
can	O
be	O
written	O
in	O
a	O
more	O
imperative	B-Application
style	O
compared	O
to	O
the	O
C++	B-Language
functional	B-Language
style	O
for	O
templates	O
.	O
</s>
<s>
Here	O
,	O
the	O
use	O
of	O
static	O
if	O
,	O
D	B-Application
's	O
compile-time	O
conditional	O
construct	O
,	O
is	O
demonstrated	O
to	O
construct	O
a	O
template	O
that	O
performs	O
the	O
same	O
calculation	O
using	O
code	O
that	O
is	O
similar	O
to	O
that	O
of	O
the	O
function	O
above	O
:	O
</s>
<s>
The	O
types	O
of	O
constants	O
need	O
not	O
be	O
specified	O
explicitly	O
as	O
the	O
compiler	B-Language
infers	O
their	O
types	O
from	O
the	O
right-hand	O
sides	O
of	O
assignments	O
:	O
</s>
<s>
This	O
is	O
an	O
example	O
of	O
compile-time	O
function	O
execution	O
(	O
CTFE	O
)	O
.	O
</s>
<s>
Ordinary	O
functions	O
may	O
be	O
used	O
in	O
constant	O
,	O
compile-time	O
expressions	O
provided	O
they	O
meet	O
certain	O
criteria	O
:	O
</s>
<s>
The	O
std.string.format	O
function	O
performs	O
printf-like	O
data	O
formatting	O
(	O
also	O
at	O
compile-time	O
,	O
through	O
CTFE	O
)	O
,	O
and	O
the	O
"	O
msg	O
"	O
pragma	O
displays	O
the	O
result	O
at	O
compile	B-Language
time	O
:	O
</s>
<s>
String	O
mixins	B-Language
,	O
combined	O
with	O
compile-time	O
function	O
execution	O
,	O
allow	O
for	O
the	O
generation	O
of	O
D	B-Application
code	O
using	O
string	O
operations	O
at	O
compile	B-Language
time	O
.	O
</s>
<s>
This	O
can	O
be	O
used	O
to	O
parse	O
domain-specific	B-Language
languages	I-Language
,	O
which	O
will	O
be	O
compiled	B-Language
as	O
part	O
of	O
the	O
program	O
:	O
</s>
<s>
Memory	O
is	O
usually	O
managed	O
with	O
garbage	B-General_Concept
collection	I-General_Concept
,	O
but	O
specific	O
objects	O
may	O
be	O
finalized	O
immediately	O
when	O
they	O
go	B-Application
out	O
of	O
scope	O
.	O
</s>
<s>
This	O
is	O
what	O
the	O
majority	O
of	O
programs	O
and	O
libraries	O
written	O
in	O
D	B-Application
use	O
.	O
</s>
<s>
In	O
case	O
more	O
control	O
over	O
memory	O
layout	O
and	O
better	O
performance	O
is	O
needed	O
,	O
explicit	O
memory	O
management	O
is	O
possible	O
using	O
the	O
overloaded	O
operators	O
new	O
and	O
delete	O
,	O
by	O
calling	O
C	B-Language
's	O
malloc	B-Language
and	I-Language
free	I-Language
directly	O
,	O
or	O
implementing	O
custom	O
allocator	O
schemes	O
(	O
i.e.	O
</s>
<s>
Garbage	B-General_Concept
collection	I-General_Concept
can	O
be	O
controlled	O
:	O
programmers	O
may	O
add	O
and	O
exclude	O
memory	O
ranges	O
from	O
being	O
observed	O
by	O
the	O
collector	O
,	O
can	O
disable	O
and	O
enable	O
the	O
collector	O
and	O
force	O
either	O
a	O
generational	O
or	O
full	O
collection	O
cycle	O
.	O
</s>
<s>
The	O
manual	O
gives	O
many	O
examples	O
of	O
how	O
to	O
implement	O
different	O
highly	O
optimized	O
memory	O
management	O
schemes	O
for	O
when	O
garbage	B-General_Concept
collection	I-General_Concept
is	O
inadequate	O
in	O
a	O
program	O
.	O
</s>
<s>
In	O
functions	O
,	O
struct	B-Application
instances	O
are	O
by	O
default	O
allocated	O
on	O
the	O
stack	O
,	O
while	O
class	O
instances	O
by	O
default	O
allocated	O
on	O
the	O
heap	O
(	O
with	O
only	O
reference	O
to	O
the	O
class	O
instance	O
being	O
on	O
the	O
stack	O
)	O
.	O
</s>
<s>
However	O
this	O
can	O
be	O
changed	O
for	O
classes	O
,	O
for	O
example	O
using	O
standard	B-Library
library	I-Library
template	O
std.typecons.scoped	O
,	O
or	O
by	O
using	O
new	O
for	O
structs	B-Application
and	O
assigning	O
to	O
a	O
pointer	O
instead	O
of	O
a	O
value-based	O
variable	O
.	O
</s>
<s>
For	O
dynamic	B-Data_Structure
arrays	I-Data_Structure
,	O
one	O
can	O
use	O
the	O
core.stdc.stdlib.alloca	O
function	O
(	O
similar	O
to	O
alloca	O
in	O
C	B-Language
)	O
,	O
to	O
allocate	O
memory	O
on	O
the	O
stack	O
.	O
</s>
<s>
The	O
returned	O
pointer	O
can	O
be	O
used	O
(	O
recast	O
)	O
into	O
a	O
(	O
typed	O
)	O
dynamic	B-Data_Structure
array	I-Data_Structure
,	O
by	O
means	O
of	O
a	O
slice	O
(	O
however	O
resizing	O
array	O
,	O
including	O
appending	O
must	O
be	O
avoided	O
;	O
and	O
for	O
obvious	O
reasons	O
they	O
must	O
not	O
be	O
returned	O
from	O
the	O
function	O
)	O
.	O
</s>
<s>
A	O
scope	O
keyword	O
can	O
be	O
used	O
both	O
to	O
annotate	O
parts	O
of	O
code	O
,	O
but	O
also	O
variables	O
and	O
classes/structs	O
,	O
to	O
indicate	O
they	O
should	O
be	O
destroyed	O
(	O
destructor	O
called	O
)	O
immediately	O
on	O
scope	O
exit	O
.	O
</s>
<s>
Whatever	O
the	O
memory	O
is	O
deallocated	O
also	O
depends	O
on	O
implementation	O
and	O
class-vs-struct	O
differences	O
.	O
</s>
<s>
std.experimental.allocator	O
contains	O
a	O
modular	B-Architecture
and	O
composable	O
allocator	O
templates	O
,	O
to	O
create	O
custom	O
high	O
performance	O
allocators	O
for	O
special	O
use	O
cases	O
.	O
</s>
<s>
is	O
the	O
name	O
given	O
to	O
the	O
subset	O
of	O
D	B-Application
that	O
can	O
be	O
guaranteed	O
to	O
be	O
memory	B-Application
safe	I-Application
(	O
no	O
writes	O
to	O
memory	O
that	O
has	O
not	O
been	O
allocated	O
or	O
that	O
has	O
been	O
recycled	O
)	O
.	O
</s>
<s>
Functions	O
marked	O
@safe	O
are	O
checked	O
at	O
compile	B-Language
time	O
to	O
ensure	O
that	O
they	O
do	O
not	O
use	O
any	O
features	O
that	O
could	O
result	O
in	O
corruption	O
of	O
memory	O
,	O
such	O
as	O
pointer	O
arithmetic	O
and	O
unchecked	O
casts	O
,	O
and	O
any	O
other	O
functions	O
called	O
must	O
also	O
be	O
marked	O
as	O
@safe	O
or	O
@trusted	O
.	O
</s>
<s>
Functions	O
can	O
be	O
marked	O
@trusted	O
for	O
the	O
cases	O
where	O
the	O
compiler	B-Language
cannot	O
distinguish	O
between	O
safe	O
use	O
of	O
a	O
feature	O
that	O
is	O
disabled	O
in	O
SafeD	O
and	O
a	O
potential	O
case	O
of	O
memory	O
corruption	O
.	O
</s>
<s>
Initially	O
under	O
the	O
banners	O
of	O
DIP1000	O
and	O
DIP25	O
(	O
now	O
part	O
of	O
the	O
language	O
specification	O
)	O
,	O
D	B-Application
provides	O
protections	O
against	O
certain	O
ill-formed	O
constructions	O
involving	O
the	O
lifetimes	O
of	O
data	O
.	O
</s>
<s>
The	O
current	O
mechanisms	O
in	O
place	O
primarily	O
deal	O
with	O
function	O
parameters	O
and	O
stack	O
memory	O
however	O
it	O
is	O
a	O
stated	O
ambition	O
of	O
the	O
leadership	O
of	O
the	O
programming	O
language	O
to	O
provide	O
a	O
more	O
thorough	O
treatment	O
of	O
lifetimes	O
within	O
the	O
D	B-Application
programming	I-Application
language	I-Application
(	O
influenced	O
by	O
ideas	O
from	O
Rust	B-Application
programming	I-Application
language	I-Application
)	O
.	O
</s>
<s>
Within	O
@safe	O
code	O
,	O
the	O
lifetime	O
of	O
an	O
assignment	O
involving	O
a	O
reference	B-Language
type	I-Language
is	O
checked	O
to	O
ensure	O
that	O
the	O
lifetime	O
of	O
the	O
assignee	O
is	O
longer	O
than	O
that	O
of	O
the	O
assigned	O
.	O
</s>
<s>
C	B-Language
's	O
application	B-Operating_System
binary	I-Operating_System
interface	I-Operating_System
(	O
ABI	O
)	O
is	O
supported	O
,	O
as	O
well	O
as	O
all	O
of	O
C	B-Language
's	O
fundamental	O
and	O
derived	O
types	O
,	O
enabling	O
direct	O
access	O
to	O
existing	O
C	B-Language
code	O
and	O
libraries	O
.	O
</s>
<s>
D	B-Application
bindings	B-Application
are	O
available	O
for	O
many	O
popular	O
C	B-Language
libraries	O
.	O
</s>
<s>
Additionally	O
,	O
C	B-Language
's	O
standard	B-Library
library	I-Library
is	O
part	O
of	O
standard	O
D	B-Application
.	O
</s>
<s>
On	O
Microsoft	B-Application
Windows	I-Application
,	O
D	B-Application
can	O
access	O
Component	B-Application
Object	I-Application
Model	I-Application
(	O
COM	O
)	O
code	O
.	O
</s>
<s>
As	O
long	O
as	O
memory	O
management	O
is	O
properly	O
taken	O
care	O
of	O
,	O
many	O
other	O
languages	O
can	O
be	O
mixed	O
with	O
D	B-Application
in	O
a	O
single	O
binary	O
.	O
</s>
<s>
For	O
example	O
,	O
GDC	O
compiler	B-Language
allow	O
to	O
link	O
C	B-Language
,	O
C++	B-Language
,	O
and	O
other	O
supported	O
language	O
codes	O
to	O
be	O
intermixed	O
.	O
</s>
<s>
D	B-Application
code	O
(	O
functions	O
)	O
can	O
also	O
be	O
marked	O
as	O
using	O
C	B-Language
,	O
C++	B-Language
,	O
Pascal	O
ABIs	O
,	O
and	O
thus	O
be	O
passed	O
to	O
the	O
libraries	O
written	O
in	O
these	O
languages	O
as	O
callbacks	O
.	O
</s>
<s>
This	O
usually	O
restricts	O
use	O
to	O
primitive	O
types	O
,	O
pointers	O
,	O
some	O
forms	O
of	O
arrays	O
,	O
unions	O
,	O
structs	B-Application
,	O
and	O
only	O
some	O
types	O
of	O
function	O
pointers	O
.	O
</s>
<s>
Because	O
many	O
other	O
programming	O
languages	O
often	O
provide	O
the	O
C	B-Language
API	O
for	O
writing	O
extensions	O
or	O
running	O
the	O
interpreter	O
of	O
the	O
languages	O
,	O
D	B-Application
can	O
interface	O
directly	O
with	O
these	O
languages	O
as	O
well	O
,	O
using	O
standard	O
C	B-Language
bindings	B-Application
(	O
with	O
a	O
thin	O
D	B-Application
interface	O
file	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
there	O
are	O
bi-directional	O
bindings	B-Application
for	O
languages	O
like	O
Python	B-Language
,	O
Lua	B-Language
and	O
other	O
languages	O
,	O
often	O
using	O
compile-time	O
code	O
generation	O
and	O
compile-time	O
type	O
reflection	B-Language
methods	O
.	O
</s>
<s>
D	B-Application
takes	O
a	O
permissive	O
but	O
realistic	O
approach	O
to	O
interoperation	O
with	O
C++	B-Language
code	I-Language
.	O
</s>
<s>
For	O
D	B-Application
code	O
marked	O
as	O
extern( C++	O
)	O
,	O
the	O
following	O
features	O
are	O
specified	O
:	O
</s>
<s>
The	O
name	O
mangling	O
conventions	O
shall	O
match	O
those	O
of	O
C++	B-Language
on	O
the	O
target	O
.	O
</s>
<s>
The	O
vtable	O
shall	O
be	O
matched	O
up	O
to	O
single	B-Application
inheritance	I-Application
(	O
the	O
only	O
level	O
supported	O
by	O
the	O
D	B-Application
language	I-Application
specification	O
)	O
.	O
</s>
<s>
C++	B-Language
namespaces	O
are	O
used	O
via	O
the	O
syntax	B-Application
extern( C++	O
,	O
namespace	O
)	O
where	O
namespace	O
is	O
the	O
name	O
of	O
the	O
C++	B-Language
namespace	O
.	O
</s>
<s>
The	O
D	B-Application
programming	I-Application
language	I-Application
has	O
an	O
official	O
subset	O
known	O
as	O
""	O
.	O
</s>
<s>
This	O
subset	O
forbids	O
access	O
to	O
D	B-Application
features	O
requiring	O
use	O
of	O
runtime	B-Library
libraries	I-Library
other	O
than	O
that	O
of	O
C	B-Language
.	O
</s>
<s>
Enabled	O
via	O
the	O
compiler	B-Language
flags	O
"	O
-betterC	O
"	O
on	O
DMD	O
and	O
LDC	O
,	O
and	O
"	O
-fno-druntime	O
"	O
on	O
GDC	O
,	O
may	O
only	O
call	O
into	O
D	B-Application
code	O
compiled	B-Language
under	O
the	O
same	O
flag	O
(	O
and	O
linked	O
code	O
other	O
than	O
D	B-Application
)	O
but	O
code	O
compiled	B-Language
without	O
the	O
option	O
may	O
call	O
into	O
code	O
compiled	B-Language
with	O
it	O
:	O
this	O
will	O
,	O
however	O
,	O
lead	O
to	O
slightly	O
different	O
behaviours	O
due	O
to	O
differences	O
in	O
how	O
C	B-Language
and	O
D	B-Application
handle	O
asserts	O
.	O
</s>
<s>
D	B-Application
was	O
first	O
released	O
in	O
December	O
2001	O
and	O
reached	O
version	O
1.0	O
in	O
January	O
2007	O
.	O
</s>
<s>
The	O
first	O
version	O
of	O
the	O
language	O
(	O
D1	O
)	O
concentrated	O
on	O
the	O
imperative	B-Application
,	O
object	B-Language
oriented	I-Language
and	O
metaprogramming	B-Application
paradigms	O
,	O
similar	O
to	O
C++	B-Language
.	O
</s>
<s>
Some	O
members	O
of	O
the	O
D	B-Application
community	O
dissatisfied	O
with	O
Phobos	O
,	O
D	B-Application
's	O
official	O
runtime	B-Library
and	O
standard	B-Library
library	I-Library
,	O
created	O
an	O
alternative	O
runtime	B-Library
and	O
standard	B-Library
library	I-Library
named	O
Tango	O
.	O
</s>
<s>
The	O
first	O
public	O
Tango	O
announcement	O
came	O
within	O
days	O
of	O
D	B-Application
1.0	O
'	O
s	O
release	O
.	O
</s>
<s>
Tango	O
adopted	O
a	O
different	O
programming	O
style	O
,	O
embracing	O
OOP	O
and	O
high	O
modularity	B-Architecture
.	O
</s>
<s>
Being	O
a	O
community-led	O
project	O
,	O
Tango	O
was	O
more	O
open	O
to	O
contributions	O
,	O
which	O
allowed	O
it	O
to	O
progress	O
faster	O
than	O
the	O
official	O
standard	B-Library
library	I-Library
.	O
</s>
<s>
At	O
that	O
time	O
,	O
Tango	O
and	O
Phobos	O
were	O
incompatible	O
due	O
to	O
different	O
runtime	B-Library
support	O
APIs	O
(	O
the	O
garbage	B-General_Concept
collector	I-General_Concept
,	O
threading	O
support	O
,	O
etc	O
.	O
)	O
.	O
</s>
<s>
D2	O
introduced	O
breaking	B-General_Concept
changes	I-General_Concept
to	O
the	O
language	O
,	O
beginning	O
with	O
its	O
first	O
experimental	O
const	O
system	O
.	O
</s>
<s>
D2	O
later	O
added	O
numerous	O
other	O
language	O
features	O
,	O
such	O
as	O
closures	B-Language
,	O
purity	B-Application
,	O
and	O
support	O
for	O
the	O
functional	B-Language
and	O
concurrent	O
programming	O
paradigms	O
.	O
</s>
<s>
D2	O
also	O
solved	O
standard	B-Library
library	I-Library
problems	O
by	O
separating	O
the	O
runtime	B-Library
from	O
the	O
standard	B-Library
library	I-Library
.	O
</s>
<s>
The	O
release	O
of	O
Andrei	O
Alexandrescu	O
's	O
book	O
The	O
D	B-Application
Programming	I-Application
Language	I-Application
on	O
12	O
June	O
2010	O
,	O
marked	O
the	O
stabilization	O
of	O
D2	O
,	O
which	O
today	O
is	O
commonly	O
referred	O
to	O
as	O
just	O
"	O
D	B-Application
"	O
.	O
</s>
<s>
In	O
January	O
2011	O
,	O
D	B-Application
development	O
moved	O
from	O
a	O
bugtracker	O
/	O
patch-submission	O
basis	O
to	O
GitHub	B-Application
.	O
</s>
<s>
This	O
has	O
led	O
to	O
a	O
significant	O
increase	O
in	O
contributions	O
to	O
the	O
compiler	B-Language
,	O
runtime	B-Library
and	O
standard	B-Library
library	I-Library
.	O
</s>
<s>
The	O
final	O
D1	O
release	O
,	O
D	B-Application
v1.076	O
,	O
was	O
on	O
31	O
December	O
2012	O
.	O
</s>
<s>
Code	O
for	O
the	O
official	O
D	B-Application
compiler	B-Language
,	O
the	O
Digital	B-Application
Mars	I-Application
D	I-Application
compiler	B-Language
by	O
Walter	O
Bright	O
,	O
was	O
originally	O
released	O
under	O
a	O
custom	O
license	B-License
,	O
qualifying	O
as	O
source	B-License
available	I-License
but	O
not	O
conforming	O
to	O
the	B-License
Open	I-License
Source	I-License
Definition	I-License
.	O
</s>
<s>
In	O
2014	O
,	O
the	O
compiler	B-Language
front-end	O
was	O
re-licensed	O
as	O
open	B-Application
source	I-Application
under	O
the	O
Boost	O
Software	B-License
License	I-License
.	O
</s>
<s>
On	O
7	O
April	O
2017	O
,	O
the	O
whole	O
compiler	B-Language
was	O
made	O
available	O
under	O
the	O
Boost	O
license	B-License
after	O
Symantec	O
gave	O
permission	O
to	O
re-license	O
the	O
back-end	O
,	O
too	O
.	O
</s>
<s>
On	O
21	O
June	O
2017	O
,	O
the	O
D	B-Application
Language	I-Application
was	O
accepted	O
for	O
inclusion	O
in	O
GCC	B-Application
.	O
</s>
<s>
Most	O
current	O
D	B-Application
implementations	O
compile	B-Language
directly	O
into	O
machine	B-Language
code	I-Language
for	O
efficient	O
execution	O
.	O
</s>
<s>
Production	O
ready	O
compilers	B-Language
:	O
</s>
<s>
DMD	O
–	O
The	O
Digital	B-Application
Mars	I-Application
D	I-Application
compiler	B-Language
by	O
Walter	O
Bright	O
is	O
the	O
official	O
D	B-Application
compiler	B-Language
;	O
open	O
sourced	O
under	O
the	O
Boost	O
Software	B-License
License	I-License
.	O
</s>
<s>
The	O
DMD	O
frontend	O
is	O
shared	O
by	O
GDC	O
(	O
now	O
in	O
GCC	B-Application
)	O
and	O
LDC	O
,	O
to	O
improve	O
compatibility	O
between	O
compilers	B-Language
.	O
</s>
<s>
Initially	O
the	O
frontend	O
was	O
written	O
in	O
C++	B-Language
,	O
but	O
now	O
most	O
of	O
it	O
is	O
now	O
written	O
in	O
D	B-Application
itself	O
(	O
self-hosting	O
)	O
.	O
</s>
<s>
The	O
backend	O
and	O
machine	B-Language
code	I-Language
optimizers	O
are	O
based	O
on	O
the	O
Symantec	O
compiler	B-Language
.	O
</s>
<s>
At	O
first	O
it	O
supported	O
only	O
32-bit	O
x86	B-Operating_System
,	O
with	O
support	O
added	O
for	O
64-bit	O
amd64	B-Device
and	O
PowerPC	B-Architecture
by	O
Walter	O
Bright	O
.	O
</s>
<s>
Later	O
the	O
backend	O
and	O
almost	O
the	O
entire	O
compiler	B-Language
was	O
ported	O
from	O
C++	B-Language
to	O
D	B-Application
for	O
full	O
self-hosting	O
.	O
</s>
<s>
GCC	B-Application
–	O
The	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
,	O
merged	O
GDC	O
into	O
GCC	B-Application
9	O
on	O
29	O
October	O
2018	O
.	O
</s>
<s>
The	O
first	O
working	O
versions	O
of	O
GDC	O
with	O
GCC	B-Application
,	O
based	O
on	O
GCC	B-Application
3.3	O
and	O
GCC	B-Application
3.4	O
on	O
32-bit	O
x86	B-Operating_System
on	O
Linux	B-Application
and	O
macOS	B-Operating_System
was	O
released	O
on	O
22	O
March	O
2004	O
.	O
</s>
<s>
LDC	O
–	O
A	O
compiler	B-Language
based	O
on	O
the	O
DMD	O
front-end	O
that	O
uses	O
LLVM	B-Application
as	O
its	O
compiler	B-Language
back-end	O
.	O
</s>
<s>
Toy	O
and	O
proof-of-concept	O
compilers	B-Language
:	O
</s>
<s>
D	B-Application
Compiler	B-Language
for	O
–	O
A	O
back-end	O
for	O
the	O
D	B-Application
programming	I-Application
language	I-Application
2.0	O
compiler	B-Language
.	O
</s>
<s>
It	O
compiles	B-Language
the	O
code	O
to	O
Common	O
Intermediate	O
Language	O
(	O
CIL	O
)	O
bytecode	O
rather	O
than	O
to	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
The	O
CIL	O
can	O
then	O
be	O
run	O
via	O
a	O
Common	O
Language	O
Infrastructure	O
(	O
CLI	O
)	O
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
SDC	O
–	O
The	O
Stupid	B-Application
D	I-Application
Compiler	I-Application
uses	O
a	O
custom	O
front-end	O
and	O
LLVM	B-Application
as	O
its	O
compiler	B-Language
back-end	O
.	O
</s>
<s>
It	O
is	O
written	O
in	O
D	B-Application
and	O
uses	O
a	O
scheduler	O
to	O
handle	O
symbol	O
resolution	O
in	O
order	O
to	O
elegantly	O
handle	O
the	O
compile-time	O
features	O
of	O
D	B-Application
.	O
This	O
compiler	B-Language
currently	O
supports	O
a	O
limited	O
subset	O
of	O
the	O
language	O
.	O
</s>
<s>
Using	O
above	O
compilers	B-Language
and	O
toolchains	O
,	O
it	O
is	O
possible	O
to	O
compile	B-Language
D	B-Application
programs	O
to	O
target	O
many	O
different	O
architectures	O
,	O
including	O
x86	B-Operating_System
,	O
amd64	B-Device
,	O
AArch64	B-Architecture
,	O
PowerPC	B-Architecture
,	O
MIPS64	O
,	O
DEC	B-Device
Alpha	I-Device
,	O
Motorola	B-Device
m68k	I-Device
,	O
Sparc	B-Architecture
,	O
s390	B-Device
,	O
WebAssembly	B-Language
.	O
</s>
<s>
The	O
primary	O
supported	O
operating	B-General_Concept
systems	I-General_Concept
are	O
Windows	B-Application
and	O
Linux	B-Application
,	O
but	O
various	O
compilers	B-Language
also	O
support	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
,	O
FreeBSD	B-Operating_System
,	O
NetBSD	B-Device
,	O
AIX	B-Application
,	O
Solaris/OpenSolaris	B-Application
and	O
Android	B-Application
,	O
either	O
as	O
a	O
host	O
or	O
target	O
,	O
or	O
both	O
.	O
</s>
<s>
WebAssembly	B-Language
target	O
(	O
supported	O
via	O
LDC	O
and	O
LLVM	B-Application
)	O
can	O
operate	O
in	O
any	O
WebAssembly	B-Language
environment	O
,	O
like	O
modern	O
web	O
browser	O
(	O
Google	B-Application
Chrome	I-Application
,	O
Mozilla	B-Application
Firefox	I-Application
,	O
Microsoft	B-Application
Edge	I-Application
,	O
Apple	B-Application
Safari	I-Application
)	O
,	O
or	O
dedicated	O
Wasm	O
virtual	B-Architecture
machines	I-Architecture
.	O
</s>
<s>
Editors	O
and	O
integrated	B-Application
development	I-Application
environments	I-Application
(	O
IDEs	O
)	O
supporting	O
syntax	B-Application
highlighting	O
and	O
partial	O
code	B-Application
completion	I-Application
for	O
the	O
language	O
include	O
SlickEdit	B-Application
,	O
Emacs	B-Application
,	O
vim	B-Application
,	O
SciTE	B-Language
,	O
Smultron	B-Operating_System
,	O
Zeus	O
,	O
and	O
Geany	B-Language
among	O
others	O
.	O
</s>
<s>
Mono-D	O
is	O
a	O
feature	O
rich	O
cross-platform	O
D	B-Application
focused	O
graphical	O
IDE	O
based	O
on	O
MonoDevelop	B-Language
/	O
Xamarin	O
Studio	O
,	O
mainly	O
written	O
in	O
C	B-Application
Sharp	I-Application
.	O
</s>
<s>
Eclipse	B-Application
plug-ins	O
for	O
D	B-Application
include	O
DDT	O
and	O
Descent	O
(	O
dead	O
project	O
)	O
.	O
</s>
<s>
Visual	B-Language
Studio	I-Language
Code	I-Language
integration	O
with	O
extensions	O
as	O
Dlang-Vscode	O
or	O
Code-D	O
.	O
</s>
<s>
A	O
bundle	O
is	O
available	O
for	O
TextMate	B-Application
,	O
and	O
the	O
Code::Blocks	B-Language
IDE	O
includes	O
partial	O
support	O
for	O
the	O
language	O
.	O
</s>
<s>
However	O
,	O
standard	O
IDE	O
features	O
such	O
as	O
code	B-Application
completion	I-Application
or	O
refactoring	O
are	O
not	O
yet	O
available	O
,	O
though	O
they	O
do	O
work	O
partially	O
in	O
Code::Blocks	B-Language
(	O
due	O
to	O
D	B-Application
's	O
similarity	O
to	O
C	B-Language
)	O
.	O
</s>
<s>
The	O
Xcode	O
3	O
plugin	O
"	O
D	B-Application
for	O
Xcode	O
"	O
enables	O
D-based	O
projects	O
and	O
development	O
.	O
</s>
<s>
KDevelop	B-Language
(	O
as	O
well	O
as	O
its	O
text	O
editor	O
backend	O
,	O
Kate	O
)	O
autocompletion	O
plugin	O
is	O
available	O
.	O
</s>
<s>
Open	B-Application
source	I-Application
D	B-Application
IDEs	O
for	O
Windows	B-Application
exist	O
,	O
some	O
written	O
in	O
D	B-Application
,	O
such	O
as	O
Poseidon	O
,	O
D-IDE	O
,	O
and	O
Entice	O
Designer	O
.	O
</s>
<s>
D	B-Application
applications	O
can	O
be	O
debugged	O
using	O
any	O
C/C	O
++	O
debugger	O
,	O
like	O
GDB	B-Language
or	O
WinDbg	B-Application
,	O
although	O
support	O
for	O
various	O
D-specific	O
language	O
features	O
is	O
extremely	O
limited	O
.	O
</s>
<s>
On	O
Windows	B-Application
,	O
D	B-Application
programs	O
can	O
be	O
debugged	O
using	O
,	O
or	O
Microsoft	O
debugging	O
tools	O
(	O
WinDBG	B-Application
and	O
Visual	O
Studio	O
)	O
,	O
after	O
having	O
converted	O
the	O
debug	O
information	O
using	O
.	O
</s>
<s>
The	O
debugger	O
for	O
Linux	B-Application
has	O
experimental	O
support	O
for	O
the	O
D	B-Application
language	I-Application
.	O
</s>
<s>
Ddbg	O
can	O
be	O
used	O
with	O
various	O
IDEs	O
or	O
from	O
the	O
command	O
line	O
;	O
ZeroBUGS	O
has	O
its	O
own	O
graphical	B-Application
user	I-Application
interface	I-Application
(	O
GUI	B-Application
)	O
.	O
</s>
<s>
DustMite	O
is	O
a	O
powerful	O
tool	O
for	O
minimizing	O
D	B-Application
source	O
code	O
,	O
useful	O
when	O
finding	O
compiler	B-Language
or	O
tests	O
issues	O
.	O
</s>
<s>
dub	O
is	O
a	O
popular	O
package	O
and	O
build	O
manager	O
for	O
D	B-Application
applications	O
and	O
libraries	O
,	O
and	O
is	O
often	O
integrated	O
into	O
IDE	O
support	O
.	O
</s>
<s>
The	O
main	O
function	O
is	O
the	O
entry	O
point	O
of	O
a	O
D	B-Application
program	O
,	O
and	O
args	O
is	O
an	O
array	O
of	O
strings	O
representing	O
the	O
command	O
line	O
arguments	O
.	O
</s>
<s>
A	O
string	O
in	O
D	B-Application
is	O
an	O
array	O
of	O
characters	O
,	O
represented	O
by	O
immutable(char )	O
 [  ] 	O
.	O
</s>
<s>
The	O
following	O
shows	O
several	O
D	B-Application
capabilities	O
and	O
D	B-Application
design	O
trade-offs	O
in	O
a	O
short	O
program	O
.	O
</s>
<s>
signature2words	O
is	O
a	O
built-in	O
associative	B-Application
array	I-Application
that	O
maps	O
dstring	O
(	O
32-bit	O
/	O
char	O
)	O
keys	O
to	O
arrays	O
of	O
dstrings	O
.	O
</s>
<s>
It	O
is	O
similar	O
to	O
defaultdict(list )	O
in	O
Python	B-Language
.	O
</s>
<s>
It	O
has	O
to	O
then	O
be	O
copied	O
with	O
idup	O
to	O
obtain	O
a	O
string	O
to	O
be	O
used	O
for	O
the	O
associative	B-Application
array	I-Application
values	O
(	O
the	O
idup	O
property	O
of	O
arrays	O
returns	O
an	O
immutable	O
duplicate	O
of	O
the	O
array	O
,	O
which	O
is	O
required	O
since	O
the	O
dstring	O
type	O
is	O
actually	O
immutable(dchar )	O
 [  ] 	O
)	O
.	O
</s>
<s>
Built-in	O
associative	B-Application
arrays	I-Application
require	O
immutable	O
keys	O
.	O
</s>
<s>
The	O
~	O
=	O
operator	O
appends	O
a	O
new	O
dstring	O
to	O
the	O
values	O
of	O
the	O
associate	O
dynamic	B-Data_Structure
array	I-Data_Structure
.	O
</s>
<s>
toLower	O
,	O
join	O
and	O
chomp	O
are	O
string	O
functions	O
that	O
D	B-Application
allows	O
the	O
use	O
of	O
with	O
a	O
method	O
syntax	B-Application
.	O
</s>
<s>
The	O
name	O
of	O
such	O
functions	O
are	O
often	O
similar	O
to	O
Python	B-Language
string	O
methods	O
.	O
</s>
<s>
This	O
feature	O
is	O
called	O
UFCS	O
(	O
Uniform	O
Function	O
Call	O
Syntax	B-Application
)	O
,	O
and	O
allows	O
extending	O
any	O
built-in	O
or	O
third	O
party	O
package	O
types	O
with	O
method-like	O
functionality	O
.	O
</s>
<s>
The	O
style	O
of	O
writing	O
code	O
like	O
this	O
is	O
often	O
referenced	O
as	O
pipeline	B-Operating_System
(	O
especially	O
when	O
the	O
objects	O
used	O
are	O
lazily	O
computed	O
,	O
for	O
example	O
iterators	O
/	O
ranges	O
)	O
or	O
Fluent	O
interface	O
.	O
</s>
<s>
The	O
second	O
foreach	O
iterates	O
on	O
the	O
values	O
of	O
the	O
associative	B-Application
array	I-Application
,	O
it	O
is	O
able	O
to	O
infer	O
the	O
type	O
of	O
words	O
.	O
</s>
<s>
Notable	O
organisations	O
that	O
use	O
the	O
D	B-Application
programming	I-Application
language	I-Application
for	O
projects	O
include	O
Facebook	B-Application
,	O
eBay	B-Application
,	O
and	O
Netflix	O
.	O
</s>
<s>
D	B-Application
has	O
been	O
successfully	O
used	O
for	O
AAA	O
games	O
,	O
language	O
interpreters	O
,	O
virtual	B-Architecture
machines	I-Architecture
,	O
an	O
operating	B-Operating_System
system	I-Operating_System
kernel	I-Operating_System
,	O
GPU	B-Architecture
programming	O
,	O
web	O
development	O
,	O
numerical	B-General_Concept
analysis	I-General_Concept
,	O
GUI	B-Application
applications	I-Application
,	O
a	O
passenger	B-Application
information	I-Application
system	I-Application
,	O
machine	O
learning	O
,	O
text	O
processing	O
,	O
web	O
and	O
application	O
servers	O
and	O
research	O
.	O
</s>
