<s>
Go	O
is	O
a	O
statically	O
typed	O
,	O
compiled	B-Language
high-level	B-Language
programming	I-Language
language	I-Language
designed	O
at	O
Google	B-Application
by	O
Robert	O
Griesemer	O
,	O
Rob	O
Pike	O
,	O
and	O
Ken	O
Thompson	O
.	O
</s>
<s>
It	O
is	O
syntactically	O
similar	O
to	O
C	B-Language
,	O
but	O
with	O
memory	B-Application
safety	I-Application
,	O
garbage	B-General_Concept
collection	I-General_Concept
,	O
structural	O
typing	O
,	O
and	O
CSP-style	O
concurrency	B-Architecture
.	O
</s>
<s>
It	O
is	O
often	O
referred	O
to	O
as	O
Golang	B-Application
because	O
of	O
its	O
former	O
domain	O
name	O
,	O
golang.org,	O
but	O
its	O
proper	O
name	O
is	O
Go	O
.	O
</s>
<s>
Google	B-Application
's	I-Application
self-hosting	O
"	O
gc	O
"	O
compiler	B-Language
toolchain	B-General_Concept
,	O
targeting	O
multiple	O
operating	B-General_Concept
systems	I-General_Concept
and	O
WebAssembly	B-Language
.	O
</s>
<s>
gofrontend	O
,	O
a	O
frontend	O
to	O
other	O
compilers	B-Language
,	O
with	O
the	O
libgo	O
library	O
.	O
</s>
<s>
With	O
GCC	B-Application
the	O
combination	O
is	O
gccgo	B-Application
;	O
with	O
LLVM	B-Application
the	O
combination	O
is	O
gollvm	O
.	O
</s>
<s>
A	O
third-party	O
source-to-source	B-Language
compiler	I-Language
,	O
GopherJS	O
,	O
compiles	B-Language
Go	O
to	O
JavaScript	B-Language
for	O
front-end	O
web	O
development	O
.	O
</s>
<s>
Go	O
was	O
designed	O
at	O
Google	B-Application
in	O
2007	O
to	O
improve	O
programming	O
productivity	O
in	O
an	O
era	O
of	O
multicore	B-Architecture
,	O
networked	B-Architecture
machines	O
and	O
large	O
codebases	B-General_Concept
.	O
</s>
<s>
The	O
designers	O
wanted	O
to	O
address	O
criticism	O
of	O
other	O
languages	O
in	O
use	O
at	O
Google	B-Application
,	O
but	O
keep	O
their	O
useful	O
characteristics	O
:	O
</s>
<s>
Its	O
designers	O
were	O
primarily	O
motivated	O
by	O
their	O
shared	O
dislike	B-Language
of	I-Language
C++	I-Language
.	O
</s>
<s>
Go	O
is	O
widely	O
used	O
in	O
production	O
at	O
Google	B-Application
and	O
in	O
many	O
other	O
organizations	O
and	O
open-source	B-Application
projects	O
.	O
</s>
<s>
The	O
Gopher	B-Protocol
mascot	B-Application
was	O
introduced	O
in	O
2009	O
for	O
the	O
open	B-License
source	I-License
launch	O
of	O
the	O
language	O
.	O
</s>
<s>
The	O
design	O
,	O
by	O
Renée_French	O
,	O
borrowed	O
from	O
a	O
c	B-Language
.	O
2000	O
WFMU	O
promotion	O
.	O
</s>
<s>
Both	O
Go	O
and	O
Go	O
Mono	O
adhere	O
to	O
the	O
DIN	B-Application
1450	O
standard	O
by	O
having	O
a	O
slashed	O
zero	O
,	O
lowercase	O
l	O
with	O
a	O
tail	O
,	O
and	O
an	O
uppercase	O
I	O
with	O
serifs	O
.	O
</s>
<s>
(	O
The	O
Gopher	B-Protocol
mascot	B-Application
remained	O
the	O
same	O
.	O
)	O
</s>
<s>
The	O
lack	O
of	O
support	O
for	O
generic	B-Language
programming	I-Language
in	O
initial	O
versions	O
of	O
Go	O
drew	O
considerable	O
criticism	O
.	O
</s>
<s>
The	O
designers	O
expressed	O
an	O
openness	O
to	O
generic	B-Language
programming	I-Language
and	O
noted	O
that	O
built-in	O
functions	O
were	O
in	O
fact	O
type-generic	O
,	O
but	O
are	O
treated	O
as	O
special	O
cases	O
;	O
Pike	O
called	O
this	O
a	O
weakness	O
that	O
might	O
at	O
some	O
point	O
be	O
changed	O
.	O
</s>
<s>
The	B-Application
Google	I-Application
team	O
built	O
at	O
least	O
one	O
compiler	B-Language
for	O
an	O
experimental	O
Go	O
dialect	O
with	O
generics	O
,	O
but	O
did	O
not	O
release	O
it	O
.	O
</s>
<s>
In	O
August	O
2018	O
,	O
the	O
Go	O
principal	O
contributors	O
published	O
draft	O
designs	O
for	O
generic	B-Language
programming	I-Language
and	O
error	B-General_Concept
handling	I-General_Concept
and	O
asked	O
users	O
to	O
submit	O
feedback	O
.	O
</s>
<s>
However	O
,	O
the	O
error	B-General_Concept
handling	I-General_Concept
proposal	O
was	O
eventually	O
abandoned	O
.	O
</s>
<s>
Go	O
is	O
influenced	O
by	O
C	B-Language
(	O
especially	O
the	O
Plan	B-Operating_System
9	I-Operating_System
dialect	O
)	O
,	O
but	O
with	O
an	O
emphasis	O
on	O
greater	O
simplicity	O
and	O
safety	O
.	O
</s>
<s>
A	O
syntax	O
and	O
environment	O
adopting	O
patterns	O
more	O
common	O
in	O
dynamic	B-Language
languages	I-Language
:	O
</s>
<s>
Go	O
's	O
syntax	O
includes	O
changes	O
from	O
C	B-Language
aimed	O
at	O
keeping	O
code	O
concise	O
and	O
readable	O
.	O
</s>
<s>
This	O
contrasts	O
with	O
C	B-Language
's	O
int	O
i	O
=	O
3	O
;	O
and	O
const	O
char	O
*	O
s	O
=	O
"	O
Hello	O
,	O
world	O
!	O
"	O
;	O
.	O
</s>
<s>
Methods	O
may	O
return	B-Language
multiple	O
values	O
,	O
and	O
returning	O
a	O
result	O
,	O
err	O
pair	O
is	O
the	O
conventional	O
way	O
a	O
method	B-Language
indicates	O
an	O
error	O
to	O
its	O
caller	O
in	O
Go	O
.	O
</s>
<s>
Go	O
adds	O
literal	O
syntaxes	O
for	O
initializing	O
struct	B-Application
parameters	O
by	O
name	O
and	O
for	O
initializing	O
maps	B-Application
and	O
slices	O
.	O
</s>
<s>
As	O
an	O
alternative	O
to	O
C	B-Language
's	O
three-statement	O
for	O
loop	O
,	O
Go	O
's	O
range	O
expressions	O
allow	O
concise	O
iteration	O
over	O
arrays	O
,	O
slices	O
,	O
strings	O
,	O
maps	B-Application
,	O
and	O
channels	B-Operating_System
.	O
</s>
<s>
Dynamic	B-Data_Structure
arrays	I-Data_Structure
are	O
available	O
as	O
"	O
slices	O
"	O
,	O
denoted	O
for	O
some	O
type	O
.	O
</s>
<s>
Address-taking	O
and	O
indirection	O
use	O
the	O
and	O
operators	O
,	O
as	O
in	O
C	B-Language
,	O
or	O
happen	O
implicitly	O
through	O
the	O
method	B-Language
call	I-Language
or	O
attribute	O
access	O
syntax	O
.	O
</s>
<s>
For	O
a	O
pair	O
of	O
types	O
,	O
,	O
the	O
type	O
is	O
the	O
type	O
of	O
hash	B-Algorithm
tables	I-Algorithm
mapping	O
type	O
-	O
keys	O
to	O
type	O
-	O
values	O
.	O
</s>
<s>
Hash	B-Algorithm
tables	I-Algorithm
are	O
built	O
into	O
the	O
language	O
,	O
with	O
special	O
syntax	O
and	O
built-in	O
functions	O
.	O
</s>
<s>
is	O
a	O
channel	B-Operating_System
that	O
allows	O
sending	O
values	O
of	O
type	O
T	O
between	O
concurrent	B-Operating_System
Go	O
processes	O
.	O
</s>
<s>
Aside	O
from	O
its	O
support	O
for	O
interfaces	B-Application
,	O
Go	O
's	O
type	O
system	O
is	O
nominal	O
:	O
the	O
keyword	O
can	O
be	O
used	O
to	O
define	O
a	O
new	O
named	O
type	O
,	O
which	O
is	O
distinct	O
from	O
other	O
named	O
types	O
that	O
have	O
the	O
same	O
layout	O
(	O
in	O
the	O
case	O
of	O
a	O
,	O
the	O
same	O
members	O
in	O
the	O
same	O
order	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
keyword	O
can	O
be	O
used	O
to	O
define	O
a	O
type	O
for	O
IPv4	B-Protocol
addresses	O
,	O
based	O
on	O
32-bit	O
unsigned	O
integers	O
:	O
</s>
<s>
Constant	O
expressions	O
may	O
be	O
either	O
typed	O
or	O
"	O
untyped	O
"	O
;	O
they	O
are	O
given	O
a	O
type	O
when	O
assigned	O
to	O
a	O
typed	O
variable	O
if	O
the	O
value	O
they	O
represent	O
passes	O
a	O
compile-time	O
check	O
.	O
</s>
<s>
Function	O
types	O
are	O
indicated	O
by	O
the	O
keyword	O
;	O
they	O
take	O
zero	O
or	O
more	O
parameters	O
and	O
return	B-Language
zero	O
or	O
more	O
values	O
,	O
all	O
of	O
which	O
are	O
typed	O
.	O
</s>
<s>
The	O
parameter	O
and	O
return	B-Language
values	I-Language
determine	O
a	O
function	O
type	O
;	O
thus	O
,	O
is	O
the	O
type	O
of	O
functions	O
that	O
take	O
a	O
and	O
a	O
32-bit	O
signed	O
integer	O
,	O
and	O
return	B-Language
a	O
signed	O
integer	O
(	O
of	O
default	O
width	O
)	O
and	O
a	O
value	O
of	O
the	O
built-in	O
interface	B-Application
type	O
.	O
</s>
<s>
Any	O
named	O
type	O
has	O
a	O
method	B-Language
set	O
associated	O
with	O
it	O
.	O
</s>
<s>
The	O
IP	O
address	O
example	O
above	O
can	O
be	O
extended	O
with	O
a	O
method	B-Language
for	O
checking	O
whether	O
its	O
value	O
is	O
a	O
known	O
standard	O
:	O
</s>
<s>
Due	O
to	O
nominal	O
typing	O
,	O
this	O
method	B-Language
definition	O
adds	O
a	O
method	B-Language
to	O
,	O
but	O
not	O
on	O
.	O
</s>
<s>
While	O
methods	O
have	O
special	O
definition	O
and	O
call	O
syntax	O
,	O
there	O
is	O
no	O
distinct	O
method	B-Language
type	O
.	O
</s>
<s>
Go	O
provides	O
two	O
features	O
that	O
replace	O
class	B-Language
inheritance	I-Language
.	O
</s>
<s>
The	O
first	O
is	O
embedding	O
,	O
which	O
can	O
be	O
viewed	O
as	O
an	O
automated	O
form	O
of	O
composition	B-Library
.	O
</s>
<s>
The	O
second	O
are	O
its	O
interfaces	B-Application
,	O
which	O
provides	O
runtime	B-Library
polymorphism	O
.	O
</s>
<s>
Interfaces	B-Application
are	O
a	O
class	O
of	O
types	O
and	O
provide	O
a	O
limited	O
form	O
of	O
structural	O
typing	O
in	O
the	O
otherwise	O
nominal	O
type	O
system	O
of	O
Go	O
.	O
</s>
<s>
An	O
object	O
which	O
is	O
of	O
an	O
interface	B-Application
type	O
is	O
also	O
of	O
another	O
type	O
,	O
much	O
like	O
C++	B-Language
objects	O
being	O
simultaneously	O
of	O
a	O
base	O
and	O
derived	O
class	O
.	O
</s>
<s>
Go	O
interfaces	B-Application
were	O
designed	O
after	O
protocols	O
from	O
the	O
Smalltalk	O
programming	O
language	O
.	O
</s>
<s>
Multiple	O
sources	O
use	O
the	O
term	O
duck	B-Application
typing	I-Application
when	O
describing	O
Go	O
interfaces	B-Application
.	O
</s>
<s>
Although	O
the	O
term	O
duck	B-Application
typing	I-Application
is	O
not	O
precisely	O
defined	O
and	O
therefore	O
not	O
wrong	O
,	O
it	O
usually	O
implies	O
that	O
type	O
conformance	O
is	O
not	O
statically	O
checked	O
.	O
</s>
<s>
Because	O
conformance	O
to	O
a	O
Go	O
interface	B-Application
is	O
checked	O
statically	O
by	O
the	O
Go	O
compiler	B-Language
(	O
except	O
when	O
performing	O
a	O
type	O
assertion	O
)	O
,	O
the	O
Go	O
authors	O
prefer	O
the	O
term	O
structural	O
typing	O
.	O
</s>
<s>
The	O
definition	O
of	O
an	O
interface	B-Application
type	O
lists	O
required	O
methods	O
by	O
name	O
and	O
type	O
.	O
</s>
<s>
Any	O
object	O
of	O
type	O
T	O
for	O
which	O
functions	O
exist	O
matching	O
all	O
the	O
required	O
methods	O
of	O
interface	B-Application
type	O
I	O
is	O
an	O
object	O
of	O
type	O
I	O
as	O
well	O
.	O
</s>
<s>
In	O
formal	O
language	O
,	O
Go	O
's	O
interface	B-Application
system	O
provides	O
structural	O
rather	O
than	O
nominal	O
typing	O
.	O
</s>
<s>
Interfaces	B-Application
can	O
embed	O
other	O
interfaces	B-Application
with	O
the	O
effect	O
of	O
creating	O
a	O
combined	O
interface	B-Application
that	O
is	O
satisfied	O
by	O
exactly	O
the	O
types	O
that	O
implement	O
the	O
embedded	O
interface	B-Application
and	O
any	O
methods	O
that	O
the	O
newly	O
defined	O
interface	B-Application
adds	O
.	O
</s>
<s>
The	O
Go	O
standard	O
library	O
uses	O
interfaces	B-Application
to	O
provide	O
genericity	B-Language
in	O
several	O
places	O
,	O
including	O
the	O
input/output	B-General_Concept
system	O
that	O
is	O
based	O
on	O
the	O
concepts	O
of	O
and	O
.	O
</s>
<s>
Besides	O
calling	O
methods	O
via	O
interfaces	B-Application
,	O
Go	O
allows	O
converting	O
interface	B-Application
values	O
to	O
other	O
types	O
with	O
a	O
run-time	B-Library
type	O
check	O
.	O
</s>
<s>
The	O
language	O
constructs	O
to	O
do	O
so	O
are	O
the	O
type	O
assertion	O
,	O
which	O
checks	O
against	O
a	O
single	O
potential	O
type:and	O
the	O
type	O
switch	O
,	O
which	O
checks	O
against	O
multiple	O
types:The	O
empty	O
interface	B-Application
interface{}	O
is	O
an	O
important	O
base	O
case	O
because	O
it	O
can	O
refer	O
to	O
an	O
item	O
of	O
any	O
concrete	O
type	O
.	O
</s>
<s>
It	O
is	O
similar	O
to	O
the	O
class	O
in	O
Java	B-Language
or	O
C#	B-Application
and	O
is	O
satisfied	O
by	O
any	O
type	O
,	O
including	O
built-in	O
types	O
like	O
.	O
</s>
<s>
Code	O
using	O
the	O
empty	O
interface	B-Application
cannot	O
simply	O
call	O
methods	O
(	O
or	O
built-in	O
operators	O
)	O
on	O
the	O
referred-to	O
object	O
,	O
but	O
it	O
can	O
store	O
the	O
interface{}	O
value	O
,	O
try	O
to	O
convert	O
it	O
to	O
a	O
more	O
useful	O
type	O
via	O
a	O
type	O
assertion	O
or	O
type	O
switch	O
,	O
or	O
inspect	O
it	O
with	O
Go	O
's	O
reflect	O
package	O
.	O
</s>
<s>
Because	O
interface{}	O
can	O
refer	O
to	O
any	O
value	O
,	O
it	O
is	O
a	O
limited	O
way	O
to	O
escape	O
the	O
restrictions	O
of	O
static	O
typing	O
,	O
like	O
void*	O
in	O
C	B-Language
but	O
with	O
additional	O
run-time	B-Library
type	O
checks	O
.	O
</s>
<s>
The	O
interface{}	O
type	O
can	O
be	O
used	O
to	O
model	O
structured	O
data	O
of	O
any	O
arbitrary	O
schema	O
in	O
Go	O
,	O
such	O
as	O
JSON	B-General_Concept
or	O
YAML	B-Protocol
data	O
,	O
by	O
representing	O
it	O
as	O
a	O
map[string]interface{}	O
(	O
map	O
of	O
string	O
to	O
empty	O
interface	B-Application
)	O
.	O
</s>
<s>
This	O
recursively	O
describes	O
data	O
in	O
the	O
form	O
of	O
a	O
dictionary	B-Application
with	O
string	O
keys	O
and	O
values	O
of	O
any	O
type	O
.	O
</s>
<s>
Interface	B-Application
values	O
are	O
implemented	O
using	O
pointer	O
to	O
data	O
and	O
a	O
second	O
pointer	O
to	O
run-time	B-Library
type	O
information	O
.	O
</s>
<s>
Like	O
some	O
other	O
types	O
implemented	O
using	O
pointers	O
in	O
Go	O
,	O
interface	B-Application
values	O
are	O
nil	O
if	O
uninitialized	O
.	O
</s>
<s>
Since	O
version	O
1.18	O
,	O
Go	O
supports	O
generic	O
code	O
using	O
parameterized	B-Language
types	I-Language
.	O
</s>
<s>
In	O
Go	O
's	O
package	O
system	O
,	O
each	O
package	O
has	O
a	O
path	O
(	O
e.g.	O
,	O
"	O
compress/bzip2	O
"	O
or	O
"	O
golang.org/x/net/html	O
"	O
)	O
and	O
a	O
name	O
(	O
e.g.	O
,	O
bzip2	O
or	O
html	O
)	O
.	O
</s>
<s>
The	O
go	O
get	O
command	O
can	O
retrieve	O
packages	O
stored	O
in	O
a	O
remote	O
repository	B-General_Concept
and	O
developers	O
are	O
encouraged	O
to	O
develop	O
packages	O
inside	O
a	O
base	O
path	O
corresponding	O
to	O
a	O
source	O
repository	B-General_Concept
(	O
such	O
as	O
example.com/user_name/package_name	O
)	O
to	O
reduce	O
the	O
likelihood	O
of	O
name	O
collision	O
with	O
future	O
additions	O
to	O
the	O
standard	O
library	O
or	O
other	O
external	O
libraries	O
.	O
</s>
<s>
The	O
Go	B-Application
language	I-Application
has	O
built-in	O
facilities	O
,	O
as	O
well	O
as	O
library	O
support	O
,	O
for	O
writing	O
concurrent	B-Architecture
programs	I-Architecture
.	O
</s>
<s>
Concurrency	B-Architecture
refers	O
not	O
only	O
to	O
CPU	O
parallelism	B-Operating_System
,	O
but	O
also	O
to	O
asynchrony	B-Architecture
:	O
letting	O
slow	O
operations	O
like	O
a	O
database	O
or	O
network	O
read	O
run	O
while	O
the	O
program	O
does	O
other	O
work	O
,	O
as	O
is	O
common	O
in	O
event-based	O
servers	O
.	O
</s>
<s>
The	O
primary	O
concurrency	B-Architecture
construct	O
is	O
the	O
goroutine	O
,	O
a	O
type	O
of	O
light-weight	B-Operating_System
process	I-Operating_System
.	O
</s>
<s>
The	O
language	O
specification	O
does	O
not	O
specify	O
how	O
goroutines	O
should	O
be	O
implemented	O
,	O
but	O
current	O
implementations	O
multiplex	O
a	O
Go	O
process	O
's	O
goroutines	O
onto	O
a	O
smaller	O
set	O
of	O
operating-system	B-Operating_System
threads	I-Operating_System
,	O
similar	O
to	O
the	O
scheduling	O
performed	O
in	O
Erlang	B-Operating_System
.	O
</s>
<s>
While	O
a	O
standard	O
library	O
package	O
featuring	O
most	O
of	O
the	O
classical	O
concurrency	B-Operating_System
control	I-Operating_System
structures	O
(	O
mutex	B-Operating_System
locks	O
,	O
etc	O
.	O
)	O
</s>
<s>
is	O
available	O
,	O
idiomatic	O
concurrent	B-Architecture
programs	I-Architecture
instead	O
prefer	O
channels	B-Operating_System
,	O
which	O
send	B-Architecture
messages	I-Architecture
between	O
goroutines	O
.	O
</s>
<s>
Optional	O
buffers	O
store	O
messages	O
in	O
FIFO	B-Operating_System
order	O
and	O
allow	O
sending	O
goroutines	O
to	O
proceed	O
before	O
their	O
messages	O
are	O
received	O
.	O
</s>
<s>
Channels	B-Operating_System
are	O
typed	O
,	O
so	O
that	O
a	O
channel	B-Operating_System
of	O
type	O
can	O
only	O
be	O
used	O
to	O
transfer	O
messages	O
of	O
type	O
.	O
</s>
<s>
Special	O
syntax	O
is	O
used	O
to	O
operate	O
on	O
them	O
;	O
is	O
an	O
expression	O
that	O
causes	O
the	O
executing	O
goroutine	O
to	O
block	O
until	O
a	O
value	O
comes	O
in	O
over	O
the	O
channel	B-Operating_System
,	O
while	O
sends	O
the	O
value	O
(	O
possibly	O
blocking	O
until	O
another	O
goroutine	O
receives	O
the	O
value	O
)	O
.	O
</s>
<s>
The	O
built-in	O
-like	O
statement	O
can	O
be	O
used	O
to	O
implement	O
non-blocking	O
communication	O
on	O
multiple	O
channels	B-Operating_System
;	O
see	O
below	O
for	O
an	O
example	O
.	O
</s>
<s>
Go	O
has	O
a	O
memory	O
model	O
describing	O
how	O
goroutines	O
must	O
use	O
channels	B-Operating_System
or	O
other	O
operations	O
to	O
safely	O
share	O
data	O
.	O
</s>
<s>
The	O
existence	O
of	O
channels	B-Operating_System
sets	O
Go	O
apart	O
from	O
actor	O
model-style	O
concurrent	B-Operating_System
languages	I-Operating_System
like	O
Erlang	B-Operating_System
,	O
where	O
messages	O
are	O
addressed	O
directly	O
to	O
actors	O
(	O
corresponding	O
to	O
goroutines	O
)	O
.	O
</s>
<s>
The	O
actor	O
style	O
can	O
be	O
simulated	O
in	O
Go	O
by	O
maintaining	O
a	O
one-to-one	O
correspondence	O
between	O
goroutines	O
and	O
channels	B-Operating_System
,	O
but	O
the	O
language	O
allows	O
multiple	O
goroutines	O
to	O
share	O
a	O
channel	B-Operating_System
or	O
a	O
single	O
goroutine	O
to	O
send	O
and	O
receive	O
on	O
multiple	O
channels	B-Operating_System
.	O
</s>
<s>
From	O
these	O
tools	O
one	O
can	O
build	O
concurrent	B-Operating_System
constructs	O
like	O
worker	O
pools	O
,	O
pipelines	O
(	O
in	O
which	O
,	O
say	O
,	O
a	O
file	O
is	O
decompressed	O
and	O
parsed	O
as	O
it	O
downloads	O
)	O
,	O
background	O
calls	O
with	O
timeout	O
,	O
"	O
fan-out	O
"	O
parallel	O
calls	O
to	O
a	O
set	O
of	O
services	O
,	O
and	O
others	O
.	O
</s>
<s>
Channels	B-Operating_System
have	O
also	O
found	O
uses	O
further	O
from	O
the	O
usual	O
notion	O
of	O
interprocess	O
communication	O
,	O
like	O
serving	O
as	O
a	O
concurrency-safe	O
list	O
of	O
recycled	O
buffers	O
,	O
implementing	O
coroutines	B-Architecture
(	O
which	O
helped	O
inspire	O
the	O
name	O
goroutine	O
)	O
,	O
and	O
implementing	O
iterators	O
.	O
</s>
<s>
Concurrency-related	O
structural	O
conventions	O
of	O
Go	O
(	O
channels	B-Operating_System
and	O
alternative	O
channel	B-Operating_System
inputs	O
)	O
are	O
derived	O
from	O
Tony	O
Hoare	O
's	O
communicating	O
sequential	O
processes	O
model	O
.	O
</s>
<s>
Unlike	O
previous	O
concurrent	B-Architecture
programming	I-Architecture
languages	O
such	O
as	O
Occam	B-Language
or	O
Limbo	B-Application
(	O
a	O
language	O
on	O
which	O
Go	O
co-designer	O
Rob	O
Pike	O
worked	O
)	O
,	O
Go	O
does	O
not	O
provide	O
any	O
built-in	O
notion	O
of	O
safe	O
or	O
verifiable	O
concurrency	B-Architecture
.	O
</s>
<s>
Although	O
Go	O
's	O
concurrency	B-Architecture
features	O
are	O
not	O
aimed	O
primarily	O
at	O
parallel	B-Operating_System
processing	I-Operating_System
,	O
they	O
can	O
be	O
used	O
to	O
program	O
shared-memory	B-Operating_System
multi-processor	B-Operating_System
machines	O
.	O
</s>
<s>
One	O
of	O
these	O
studies	O
compared	O
the	O
size	O
(	O
in	O
lines	O
of	O
code	O
)	O
and	O
speed	O
of	O
programs	O
written	O
by	O
a	O
seasoned	O
programmer	O
not	O
familiar	O
with	O
the	O
language	O
and	O
corrections	O
to	O
these	O
programs	O
by	O
a	O
Go	O
expert	O
(	O
from	O
Google	B-Application
's	I-Application
development	O
team	O
)	O
,	O
doing	O
the	O
same	O
for	O
Chapel	B-Language
,	O
Cilk	B-Language
and	O
Intel	B-Application
TBB	I-Application
.	O
</s>
<s>
The	O
study	O
found	O
that	O
the	O
non-expert	O
tended	O
to	O
write	O
divide-and-conquer	B-Operating_System
algorithms	O
with	O
one	O
statement	O
per	O
recursion	O
,	O
while	O
the	O
expert	O
wrote	O
distribute-work-synchronize	O
programs	O
using	O
one	O
goroutine	O
per	O
processor	O
.	O
</s>
<s>
Go	O
's	O
approach	O
to	O
concurrency	B-Architecture
can	O
be	O
summarized	O
as	O
"	O
do	O
n't	O
communicate	O
by	O
sharing	O
memory	O
;	O
share	O
memory	O
by	O
communicating	O
"	O
.	O
</s>
<s>
There	O
are	O
no	O
restrictions	O
on	O
how	O
go-routines	O
access	O
shared	B-Operating_System
data	I-Operating_System
,	O
making	O
race	B-Operating_System
conditions	I-Operating_System
possible	O
.	O
</s>
<s>
Specifically	O
,	O
unless	O
a	O
program	O
explicitly	O
synchronizes	O
via	O
channels	B-Operating_System
or	O
other	O
means	O
,	O
writes	O
from	O
one	O
go-routine	O
might	O
be	O
partly	O
,	O
entirely	O
,	O
or	O
not	O
at	O
all	O
visible	O
to	O
another	O
,	O
often	O
with	O
no	O
guarantees	O
about	O
ordering	O
of	O
writes	O
.	O
</s>
<s>
Furthermore	O
,	O
Go	O
's	O
internal	O
data	O
structures	O
like	O
interface	B-Application
values	O
,	O
slice	O
headers	O
,	O
hash	B-Algorithm
tables	I-Algorithm
,	O
and	O
string	O
headers	O
are	O
not	O
immune	O
to	O
race	B-Operating_System
conditions	I-Operating_System
,	O
so	O
type	O
and	O
memory	B-Application
safety	I-Application
can	O
be	O
violated	O
in	O
multithreaded	O
programs	O
that	O
modify	O
shared	O
instances	O
of	O
those	O
types	O
without	O
synchronization	O
.	O
</s>
<s>
The	O
linker	O
in	O
the	O
gc	O
toolchain	B-General_Concept
creates	O
statically	B-Library
linked	I-Library
binaries	O
by	O
default	O
;	O
therefore	O
all	O
Go	O
binaries	O
include	O
the	O
Go	O
runtime	B-Library
.	O
</s>
<s>
Go	O
deliberately	O
omits	O
certain	O
features	O
common	O
in	O
other	O
languages	O
,	O
including	O
(	O
implementation	O
)	O
inheritance	B-Language
,	O
assertions	O
,	O
pointer	O
arithmetic	O
,	O
implicit	O
type	O
conversions	O
,	O
untagged	O
unions	O
,	O
and	O
tagged	B-Language
unions	I-Language
.	O
</s>
<s>
Of	O
the	O
omitted	O
language	O
features	O
,	O
the	O
designers	O
explicitly	O
argue	O
against	O
assertions	O
and	O
pointer	O
arithmetic	O
,	O
while	O
defending	O
the	O
choice	O
to	O
omit	O
type	B-Language
inheritance	I-Language
as	O
giving	O
a	O
more	O
useful	O
language	O
,	O
encouraging	O
instead	O
the	O
use	O
of	O
interfaces	B-Application
to	O
achieve	O
dynamic	O
dispatch	O
and	O
composition	B-Library
to	O
reuse	O
code	O
.	O
</s>
<s>
Composition	B-Library
and	O
delegation	O
are	O
in	O
fact	O
largely	O
automated	O
by	O
embedding	O
;	O
according	O
to	O
researchers	O
Schmager	O
et	O
al.	O
,	O
this	O
feature	O
"	O
has	O
many	O
of	O
the	O
drawbacks	O
of	O
inheritance	B-Language
:	O
it	O
affects	O
the	O
public	O
interface	B-Application
of	O
objects	O
,	O
it	O
is	O
not	O
fine-grained	O
(	O
i.e	O
,	O
no	O
method-level	O
control	O
over	O
embedding	O
)	O
,	O
methods	O
of	O
embedded	O
objects	O
cannot	O
be	O
hidden	O
,	O
and	O
it	O
is	O
static	O
"	O
,	O
making	O
it	O
"	O
not	O
obvious	O
"	O
whether	O
programmers	O
will	O
overuse	O
it	O
to	O
the	O
extent	O
that	O
programmers	O
in	O
other	O
languages	O
are	O
reputed	O
to	O
overuse	O
inheritance	B-Language
.	O
</s>
<s>
Exception	B-General_Concept
handling	I-General_Concept
was	O
initially	O
omitted	O
in	O
Go	O
due	O
to	O
lack	O
of	O
a	O
"	O
design	O
that	O
gives	O
value	O
proportionate	O
to	O
the	O
complexity	O
"	O
.	O
</s>
<s>
Tools	O
and	O
libraries	O
distributed	O
with	O
Go	O
suggest	O
standard	O
approaches	O
to	O
things	O
like	O
API	O
documentation	O
(	O
godoc	O
)	O
,	O
testing	O
(	O
go	O
test	O
)	O
,	O
building	B-Application
(	O
go	O
build	O
)	O
,	O
package	O
management	O
(	O
go	O
get	O
)	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
The	O
omission	O
of	O
certain	O
features	O
(	O
for	O
example	O
,	O
functional-programming	O
shortcuts	O
like	O
map	O
and	O
Java-style	O
try/finally	O
blocks	O
)	O
tends	O
to	O
encourage	O
a	O
particular	O
explicit	O
,	O
concrete	O
,	O
and	O
imperative	B-Application
programming	I-Application
style	O
.	O
</s>
<s>
The	O
main	O
Go	O
distribution	O
includes	O
tools	O
for	O
building	B-Application
,	O
testing	O
,	O
and	O
analyzing	O
code	O
:	O
</s>
<s>
It	O
also	O
includes	O
profiling	O
and	O
debugging	O
support	O
,	O
runtime	B-Library
instrumentation	O
(	O
for	O
example	O
,	O
to	O
track	O
garbage	B-General_Concept
collection	I-General_Concept
pauses	O
)	O
,	O
and	O
a	O
race	B-Operating_System
condition	I-Operating_System
tester	O
.	O
</s>
<s>
where	O
"	O
fmt	O
"	O
is	O
the	O
package	O
for	O
formatted	O
I/O	B-General_Concept
,	O
similar	O
to	O
C	B-Language
's	O
C	B-Language
file	I-Language
input/output	I-Language
.	O
</s>
<s>
The	O
following	O
simple	O
program	O
demonstrates	O
Go	O
's	O
concurrency	B-Architecture
features	O
to	O
implement	O
an	O
asynchronous	O
program	O
.	O
</s>
<s>
It	O
launches	O
two	O
lightweight	B-Operating_System
threads	I-Operating_System
(	O
"	O
goroutines	O
"	O
)	O
:	O
one	O
waits	O
for	O
the	O
user	O
to	O
type	O
some	O
text	O
,	O
while	O
the	O
other	O
implements	O
a	O
timeout	O
.	O
</s>
<s>
The	O
net/http	O
package	O
provides	O
support	O
for	O
creating	O
web	B-Application
applications	I-Application
.	O
</s>
<s>
Some	O
notable	O
open-source	B-Application
applications	I-Application
written	O
in	O
Go	O
include	O
:	O
</s>
<s>
Consul	B-Application
,	O
a	O
software	O
for	O
DNS-based	O
service	O
discovery	O
and	O
providing	O
distributed	O
Key-value	O
storage	O
,	O
segmentation	O
and	O
configuration	O
.	O
</s>
<s>
Grafana	B-Protocol
,	O
a	O
multi-platform	O
open	B-License
source	I-License
analytics	O
and	O
interactive	O
visualization	O
web	B-Application
application	I-Application
,	O
whose	O
back	O
end	O
is	O
written	O
in	O
Go	O
.	O
</s>
<s>
GoBlog	O
,	O
a	O
content	B-Protocol
management	I-Protocol
system	I-Protocol
written	O
entirely	O
in	O
Go	O
.	O
</s>
<s>
Prometheus	O
,	O
an	O
open-source	B-Application
monitoring	O
and	O
alerting	O
tool	O
.	O
</s>
<s>
SendGrid	B-Application
,	O
a	O
Boulder	O
,	O
Colorado-based	O
transactional	O
email	O
delivery	O
and	O
management	O
service	O
.	O
</s>
<s>
The	O
interface	B-Application
system	O
,	O
and	O
the	O
deliberate	O
omission	O
of	O
inheritance	B-Language
,	O
were	O
praised	O
by	O
Michele	O
Simionato	O
,	O
who	O
likened	O
these	O
characteristics	O
to	O
those	O
of	O
Standard	B-Language
ML	I-Language
,	O
calling	O
it	O
"	O
a	O
shame	O
that	O
no	O
popular	O
language	O
has	O
followed	O
 [ this ] 	O
particular	O
route	O
"	O
.	O
</s>
<s>
Go	O
was	O
named	O
Programming	O
Language	O
of	O
the	O
Year	O
by	O
the	O
TIOBE	O
Programming	O
Community	O
Index	O
in	O
its	O
first	O
year	O
,	O
2009	O
,	O
for	O
having	O
a	O
larger	O
12-month	O
increase	O
in	O
popularity	O
(	O
in	O
only	O
2	O
months	O
,	O
after	O
its	O
introduction	O
in	O
November	O
)	O
than	O
any	O
other	O
language	O
that	O
year	O
,	O
and	O
reached	O
13th	O
place	O
by	O
January	O
2010	O
,	O
surpassing	O
established	O
languages	O
like	O
Pascal	B-Application
.	O
</s>
<s>
By	O
June	O
2015	O
,	O
its	O
ranking	O
had	O
dropped	O
to	O
below	O
50th	O
in	O
the	O
index	O
,	O
placing	O
it	O
lower	O
than	O
COBOL	B-Application
and	O
Fortran	B-Application
.	O
</s>
<s>
A	O
2011	O
evaluation	O
of	O
the	O
language	O
and	O
its	O
implementation	O
in	O
comparison	O
to	O
C++	B-Language
(	O
GCC	B-Application
)	O
,	O
Java	B-Language
and	O
Scala	B-Application
by	O
a	O
Google	B-Application
engineer	O
found	O
:	O
</s>
<s>
Ian	O
Lance	O
Taylor	O
,	O
who	O
had	O
improved	O
the	O
Go	O
code	O
for	O
Hundt	O
's	O
paper	O
,	O
had	O
not	O
been	O
aware	O
of	O
the	O
intention	O
to	O
publish	O
his	O
code	O
,	O
and	O
says	O
that	O
his	O
version	O
was	O
"	O
never	O
intended	O
to	O
be	O
an	O
example	O
of	O
idiomatic	O
or	O
efficient	O
Go	O
"	O
;	O
Russ	O
Cox	O
then	O
optimized	O
the	O
Go	O
code	O
,	O
as	O
well	O
as	O
the	O
C++	B-Language
code	I-Language
,	O
and	O
got	O
the	O
Go	O
code	O
to	O
run	O
slightly	O
faster	O
than	O
C++	B-Language
and	O
more	O
than	O
an	O
order	O
of	O
magnitude	O
faster	O
than	O
the	O
code	O
in	O
the	O
paper	O
.	O
</s>
<s>
On	O
November	O
10	O
,	O
2009	O
,	O
the	O
day	O
of	O
the	O
general	O
release	O
of	O
the	O
language	O
,	O
Francis	O
McCabe	O
,	O
developer	O
of	O
the	O
Go	B-Language
!	I-Language
</s>
<s>
programming	O
language	O
(	O
note	O
the	O
exclamation	O
point	O
)	O
,	O
requested	O
a	O
name	O
change	O
of	O
Google	B-Application
's	I-Application
language	O
to	O
prevent	O
confusion	O
with	O
his	O
language	O
,	O
which	O
he	O
had	O
spent	O
10	O
years	O
developing	O
.	O
</s>
<s>
McCabe	O
raised	O
concerns	O
that	O
"	O
the	O
'	O
big	O
guy	O
 '	O
will	O
end	O
up	O
steam-rollering	O
over	O
"	O
him	O
,	O
and	O
this	O
concern	O
resonated	O
with	O
the	O
more	O
than	O
120	O
developers	O
who	O
commented	O
on	O
Google	B-Application
's	I-Application
official	O
issues	O
thread	B-Operating_System
saying	O
they	O
should	O
change	O
the	O
name	O
,	O
with	O
some	O
even	O
saying	O
the	O
issue	O
contradicts	O
Google	B-Application
's	I-Application
motto	O
of	O
:	O
Do	O
n't	O
be	O
evil	O
.	O
</s>
<s>
On	O
October	O
12	O
,	O
2010	O
,	O
the	O
issue	O
was	O
closed	O
by	O
Google	B-Application
developer	O
Russ	O
Cox	O
(	O
@rsc	O
)	O
with	O
the	O
custom	O
status	O
"	O
Unfortunate	O
"	O
accompanied	O
by	O
the	O
following	O
comment	O
:	O
"	O
There	O
are	O
many	O
computing	O
products	O
and	O
services	O
named	O
Go	O
.	O
</s>
<s>
File	O
semantics	O
in	O
Go	O
standard	O
library	O
are	O
heavily	O
based	O
on	O
POSIX	O
semantics	O
,	O
and	O
they	O
do	O
not	O
map	O
well	O
to	O
the	O
Windows	B-Application
platform	I-Application
.	O
</s>
<s>
A	O
study	O
showed	O
that	O
it	O
is	O
as	O
easy	O
to	O
make	O
concurrency	B-Architecture
bugs	O
with	O
message	B-Architecture
passing	I-Architecture
as	O
with	O
shared	B-Operating_System
memory	I-Operating_System
,	O
sometimes	O
even	O
more	O
.	O
</s>
