<s>
Swift	B-Application
is	O
a	O
high-level	B-Language
general-purpose	B-Language
,	O
multi-paradigm	O
,	O
compiled	B-Language
programming	I-Language
language	I-Language
developed	O
by	O
Apple	O
Inc	O
.	O
and	O
the	O
open-source	B-Application
community	O
.	O
</s>
<s>
First	O
released	O
in	O
2014	O
,	O
Swift	B-Application
was	O
developed	O
as	O
a	O
replacement	O
for	O
Apple	O
's	O
earlier	O
programming	O
language	O
Objective-C	B-Language
,	O
as	O
Objective-C	B-Language
had	O
been	O
largely	O
unchanged	O
since	O
the	O
early	O
1980s	O
and	O
lacked	O
modern	O
language	O
features	O
.	O
</s>
<s>
Swift	B-Application
works	O
with	O
Apple	O
's	O
Cocoa	B-Operating_System
and	O
Cocoa	B-Operating_System
Touch	I-Operating_System
frameworks	B-Architecture
,	O
and	O
a	O
key	O
aspect	O
of	O
Swift	B-Application
's	O
design	O
was	O
the	O
ability	O
to	O
interoperate	O
with	O
the	O
huge	O
body	O
of	O
existing	O
Objective-C	B-Language
code	O
developed	O
for	O
Apple	O
products	O
over	O
the	O
previous	O
decades	O
.	O
</s>
<s>
It	O
was	O
built	O
with	O
the	O
open	O
source	O
LLVM	B-Application
compiler	B-Language
framework	O
and	O
has	O
been	O
included	O
in	O
Xcode	B-Operating_System
since	O
version	O
6	O
,	O
released	O
in	O
2014	O
.	O
</s>
<s>
On	O
Apple	O
platforms	O
,	O
it	O
uses	O
the	O
Objective-C	B-Language
runtime	B-Library
library	I-Library
,	O
which	O
allows	O
C	B-Language
,	O
Objective-C	B-Language
,	O
C++	B-Language
and	O
Swift	B-Application
code	O
to	O
run	O
within	O
one	O
program	O
.	O
</s>
<s>
Apple	O
intended	O
Swift	B-Application
to	O
support	O
many	O
core	O
concepts	O
associated	O
with	O
Objective-C	B-Language
,	O
notably	O
dynamic	O
dispatch	O
,	O
widespread	O
late	O
binding	O
,	O
extensible	B-Application
programming	I-Application
and	O
similar	O
features	O
,	O
but	O
in	O
a	O
"	O
safer	O
"	O
way	O
,	O
making	O
it	O
easier	O
to	O
catch	O
software	B-Error_Name
bugs	I-Error_Name
;	O
Swift	B-Application
has	O
features	O
addressing	O
some	O
common	O
programming	B-Error_Name
errors	I-Error_Name
like	O
null	O
pointer	O
dereferencing	O
and	O
provides	O
syntactic	O
sugar	O
to	O
help	O
avoid	O
the	O
pyramid	O
of	O
doom	O
.	O
</s>
<s>
Swift	B-Application
supports	O
the	O
concept	O
of	O
protocol	B-Application
extensibility	O
,	O
an	O
extensibility	O
system	O
that	O
can	O
be	O
applied	O
to	O
types	O
,	O
structs	B-Application
and	O
classes	O
,	O
which	O
Apple	O
promotes	O
as	O
a	O
real	O
change	O
in	O
programming	O
paradigms	O
they	O
term	O
"	O
protocol-oriented	B-Application
programming	O
"	O
(	O
similar	O
to	O
traits	O
and	O
type	O
classes	O
)	O
.	O
</s>
<s>
Swift	B-Application
was	O
introduced	O
at	O
Apple	O
's	O
2014	O
Worldwide	O
Developers	O
Conference	O
(	O
WWDC	O
)	O
.	O
</s>
<s>
It	O
underwent	O
an	O
upgrade	O
to	O
version	O
1.2	O
during	O
2014	O
and	O
a	O
major	O
upgrade	O
to	O
Swift	B-Application
2	O
at	O
WWDC	O
2015	O
.	O
</s>
<s>
Initially	O
a	O
proprietary	B-Application
language	O
,	O
version	O
2.2	O
was	O
made	O
open-source	B-Application
software	I-Application
under	O
the	O
Apache	B-Application
License	I-Application
2.0	I-Application
on	O
December	O
3	O
,	O
2015	O
,	O
for	O
Apple	O
's	O
platforms	O
and	O
Linux	B-Application
.	O
</s>
<s>
Through	O
version	O
3.0	O
the	O
syntax	O
of	O
Swift	B-Application
went	O
through	O
significant	O
evolution	O
,	O
with	O
the	O
core	O
team	O
making	O
source	O
stability	O
a	O
focus	O
in	O
later	O
versions	O
.	O
</s>
<s>
In	O
the	O
first	O
quarter	O
of	O
2018	O
Swift	B-Application
surpassed	O
Objective-C	B-Language
in	O
measured	O
popularity	O
.	O
</s>
<s>
Swift	B-Application
4.0	O
,	O
released	O
in	O
2017	O
,	O
introduced	O
several	O
changes	O
to	O
some	O
built-in	O
classes	O
and	O
structures	O
.	O
</s>
<s>
Code	O
written	O
with	O
previous	O
versions	O
of	O
Swift	B-Application
can	O
be	O
updated	O
using	O
the	O
migration	O
functionality	O
built	O
into	O
Xcode	B-Operating_System
.	O
</s>
<s>
Swift	B-Application
5	O
,	O
released	O
in	O
March	O
2019	O
,	O
introduced	O
a	O
stable	O
binary	O
interface	O
on	O
Apple	O
platforms	O
,	O
allowing	O
the	O
Swift	B-Application
runtime	O
to	O
be	O
incorporated	O
into	O
Apple	O
operating	O
systems	O
.	O
</s>
<s>
It	O
is	O
source	O
compatible	O
with	O
Swift	B-Application
4	O
.	O
</s>
<s>
Swift	B-Application
5.1	O
was	O
officially	O
released	O
in	O
September	O
2019	O
.	O
</s>
<s>
Swift	B-Application
5.1	O
builds	O
on	O
the	O
previous	O
version	O
of	O
Swift	B-Application
5	O
by	O
extending	O
the	O
stable	O
features	O
of	O
the	O
language	O
to	O
compile-time	O
with	O
the	O
introduction	O
of	O
module	O
stability	O
.	O
</s>
<s>
The	O
introduction	O
of	O
module	O
stability	O
makes	O
it	O
possible	O
to	O
create	O
and	O
share	O
binary	O
frameworks	B-Architecture
that	O
will	O
work	O
with	O
future	O
releases	O
of	O
Swift	B-Application
.	O
</s>
<s>
Swift	B-Application
5.5	O
,	O
officially	O
announced	O
by	O
Apple	O
at	O
the	O
2021	O
WWDC	O
,	O
significantly	O
expands	O
language	O
support	O
for	O
concurrency	B-Operating_System
and	O
asynchronous	B-Operating_System
code	I-Operating_System
,	O
notably	O
introducing	O
a	O
unique	O
version	O
of	O
the	O
actor	B-Application
model	I-Application
.	O
</s>
<s>
Development	O
of	O
Swift	B-Application
started	O
in	O
July	O
2010	O
by	O
Chris	O
Lattner	O
,	O
with	O
the	O
eventual	O
collaboration	O
of	O
many	O
other	O
programmers	O
at	O
Apple	O
.	O
</s>
<s>
Swift	B-Application
took	O
language	O
ideas	O
"	O
from	O
Objective-C	B-Language
,	O
Rust	B-Application
,	O
Haskell	B-Language
,	O
Ruby	B-Language
,	O
Python	B-Language
,	O
C#	B-Application
,	O
CLU	B-Language
,	O
and	O
far	O
too	O
many	O
others	O
to	O
list	O
"	O
.	O
</s>
<s>
On	O
June	O
2	O
,	O
2014	O
,	O
the	O
Apple	O
Worldwide	O
Developers	O
Conference	O
(	O
WWDC	O
)	O
application	O
became	O
the	O
first	O
publicly	O
released	O
app	B-Application
written	O
with	O
Swift	B-Application
.	O
</s>
<s>
A	O
beta	O
version	O
of	O
the	O
programming	O
language	O
was	O
released	O
to	O
registered	O
Apple	B-Operating_System
developers	I-Operating_System
at	O
the	O
conference	O
,	O
but	O
the	O
company	O
did	O
not	O
promise	O
that	O
the	O
final	O
version	O
of	O
Swift	B-Application
would	O
be	O
source	O
code	O
compatible	O
with	O
the	O
test	O
version	O
.	O
</s>
<s>
The	O
Swift	B-Application
Programming	I-Application
Language	I-Application
,	O
a	O
free	O
500-page	O
manual	O
,	O
was	O
also	O
released	O
at	O
WWDC	O
,	O
and	O
is	O
available	O
on	O
the	O
Apple	B-Application
Books	I-Application
Store	O
and	O
the	O
official	O
website	O
.	O
</s>
<s>
Swift	B-Application
reached	O
the	O
1.0	O
milestone	O
on	O
September	O
9	O
,	O
2014	O
,	O
with	O
the	O
Gold	O
Master	O
of	O
Xcode	B-Operating_System
6.0	O
for	O
iOS	B-Application
.	O
</s>
<s>
Swift	B-Application
1.1	O
was	O
released	O
on	O
October	O
22	O
,	O
2014	O
,	O
alongside	O
the	O
launch	O
of	O
Xcode	B-Operating_System
6.1	O
.	O
</s>
<s>
Swift	B-Application
1.2	O
was	O
released	O
on	O
April	O
8	O
,	O
2015	O
,	O
along	O
with	O
Xcode	B-Operating_System
6.3	O
.	O
</s>
<s>
Swift	B-Application
2.0	O
was	O
announced	O
at	O
WWDC	O
2015	O
,	O
and	O
was	O
made	O
available	O
for	O
publishing	O
apps	O
in	O
the	O
App	B-Application
Store	O
on	O
September	O
21	O
,	O
2015	O
.	O
</s>
<s>
Swift	B-Application
3.0	O
was	O
released	O
on	O
September	O
13	O
,	O
2016	O
.	O
</s>
<s>
Swift	B-Application
4.0	O
was	O
released	O
on	O
September	O
19	O
,	O
2017	O
.	O
</s>
<s>
Swift	B-Application
4.1	O
was	O
released	O
on	O
March	O
29	O
,	O
2018	O
.	O
</s>
<s>
Swift	B-Application
won	O
first	O
place	O
for	O
Most	O
Loved	O
Programming	O
Language	O
in	O
the	O
Stack	B-Error_Name
Overflow	I-Error_Name
Developer	O
Survey	O
2015	O
and	O
second	O
place	O
in	O
2016	O
.	O
</s>
<s>
On	O
December	O
3	O
,	O
2015	O
,	O
the	O
Swift	B-Application
language	I-Application
,	O
supporting	O
libraries	O
,	O
debugger	O
,	O
and	O
package	O
manager	O
were	O
open-sourced	O
under	O
the	O
Apache	B-Application
2.0	I-Application
license	I-Application
with	O
a	O
Runtime	B-Library
Library	I-Library
Exception	O
,	O
and	O
was	O
created	O
to	O
host	O
the	O
project	O
.	O
</s>
<s>
In	O
December	O
2015	O
,	O
IBM	O
announced	O
its	O
Swift	B-Application
Sandbox	O
website	O
,	O
which	O
allows	O
developers	O
to	O
write	O
Swift	B-Application
code	O
in	O
one	O
pane	O
and	O
display	O
output	O
in	O
another	O
.	O
</s>
<s>
The	O
Swift	B-Application
Sandbox	O
was	O
deprecated	O
in	O
January	O
2018	O
.	O
</s>
<s>
During	O
the	O
WWDC	O
2016	O
,	O
Apple	O
announced	O
an	O
iPad	B-Device
exclusive	O
app	B-Application
,	O
named	O
Swift	B-Operating_System
Playgrounds	I-Operating_System
,	O
intended	O
to	O
teach	O
people	O
how	O
to	O
code	O
in	O
Swift	B-Application
.	O
</s>
<s>
The	O
app	B-Application
is	O
presented	O
in	O
a	O
3D	O
video	O
game-like	O
interface	O
which	O
provides	O
feedback	O
when	O
lines	O
of	O
code	O
are	O
placed	O
in	O
a	O
certain	O
order	O
and	O
executed	O
.	O
</s>
<s>
In	O
January	O
2017	O
,	O
Chris	O
Lattner	O
announced	O
his	O
departure	O
from	O
Apple	O
for	O
a	O
new	O
position	O
with	O
Tesla	O
Motors	O
,	O
with	O
the	O
Swift	B-Application
project	O
lead	O
role	O
going	O
to	O
team	O
veteran	O
Ted	O
Kremenek	O
.	O
</s>
<s>
During	O
WWDC	O
2019	O
,	O
Apple	O
announced	O
SwiftUI	O
with	O
Xcode	B-Operating_System
11	O
,	O
which	O
provides	O
a	O
framework	O
for	O
declarative	B-Language
UI	O
structure	O
design	O
across	O
all	O
Apple	O
platforms	O
.	O
</s>
<s>
Official	O
downloads	O
for	O
the	O
Ubuntu	B-Operating_System
distribution	I-Operating_System
of	O
Linux	B-Application
have	O
been	O
available	O
since	O
Swift	B-Application
2.2	O
,	O
with	O
more	O
distros	O
added	O
since	O
Swift	B-Application
5.2.4	O
,	O
CentOS	O
and	O
Amazon	O
Linux	B-Application
.	O
</s>
<s>
There	O
is	O
an	O
unofficial	O
SDK	O
and	O
native	O
toolchain	B-General_Concept
package	O
for	O
Android	B-Application
too	O
.	O
</s>
<s>
The	O
platforms	O
Swift	B-Application
supports	O
are	O
Apple	O
's	O
operating	O
systems	O
(	O
Darwin	B-Operating_System
,	O
iOS	B-Application
,	O
iPadOS	B-Operating_System
,	O
macOS	B-Application
,	O
tvOS	B-Operating_System
,	O
watchOS	B-Device
)	O
,	O
Linux	B-Application
,	O
Windows	O
,	O
and	O
Android	B-Application
.	O
</s>
<s>
Swift	B-Application
is	O
an	O
alternative	O
to	O
the	O
Objective-C	B-Language
language	O
that	O
employs	O
modern	O
programming-language	O
theory	O
concepts	O
and	O
strives	O
to	O
present	O
a	O
simpler	O
syntax	O
.	O
</s>
<s>
During	O
its	O
introduction	O
,	O
it	O
was	O
described	O
simply	O
as	O
"	O
Objective-C	B-Language
without	O
the	O
baggage	O
of	O
C	B-Language
"	O
.	O
</s>
<s>
By	O
default	O
,	O
Swift	B-Application
does	O
not	O
expose	O
pointers	O
and	O
other	O
unsafe	B-Application
accessors	O
,	O
in	O
contrast	O
to	O
Objective-C	B-Language
,	O
which	O
uses	O
pointers	O
pervasively	O
to	O
refer	O
to	O
object	O
instances	O
.	O
</s>
<s>
Also	O
,	O
Objective-C	B-Language
'	O
s	O
use	O
of	O
a	O
Smalltalk-like	O
syntax	O
for	O
making	O
method	B-Language
calls	I-Language
has	O
been	O
replaced	O
with	O
a	O
dot-notation	O
style	O
and	O
namespace	O
system	O
more	O
familiar	O
to	O
programmers	O
from	O
other	O
common	O
object-oriented	B-Language
(	O
OO	O
)	O
languages	O
like	O
Java	B-Device
or	O
C#	B-Application
.	O
</s>
<s>
Swift	B-Application
introduces	O
true	O
named	O
parameters	O
and	O
retains	O
key	O
Objective-C	B-Language
concepts	O
,	O
including	O
protocols	B-Application
,	O
closures	B-Language
and	O
categories	O
,	O
often	O
replacing	O
former	O
syntax	O
with	O
cleaner	O
versions	O
and	O
allowing	O
these	O
concepts	O
to	O
be	O
applied	O
to	O
other	O
language	O
structures	O
,	O
like	O
enumerated	B-Language
types	I-Language
(	O
enums	B-Language
)	O
.	O
</s>
<s>
Swift	B-Application
supports	O
closures	B-Language
,	O
which	O
are	O
self-contained	O
blocks	O
of	O
functionality	O
that	O
can	O
be	O
passed	O
around	O
and	O
used	O
in	O
code	O
,	O
and	O
can	O
also	O
be	O
used	O
as	O
anonymous	B-General_Concept
functions	I-General_Concept
.	O
</s>
<s>
Swift	B-Application
also	O
has	O
a	O
trailing	O
closure	B-Language
syntax	O
which	O
looks	O
like	O
this	O
:	O
</s>
<s>
Starting	O
from	O
version	O
5.3	O
,	O
Swift	B-Application
supports	O
multiple	O
trailing	O
closures	B-Language
:	O
</s>
<s>
Here	O
are	O
the	O
criteria	O
for	O
the	O
trailing	O
closure	B-Language
syntax	O
:	O
</s>
<s>
If	O
the	O
last	O
arguments	O
of	O
a	O
function	O
are	O
closures	B-Language
,	O
one	O
can	O
use	O
the	O
trailing	O
closure	B-Language
syntax	O
.	O
</s>
<s>
The	O
parameter	O
name	O
of	O
the	O
first	O
trailing	O
closure	B-Language
must	O
be	O
omitted	O
.	O
</s>
<s>
The	O
parameter	O
names	O
of	O
the	O
remaining	O
trailing	O
closures	B-Language
must	O
not	O
be	O
omitted	O
.	O
</s>
<s>
If	O
all	O
the	O
arguments	O
given	O
to	O
a	O
function	O
are	O
trailing	O
closures	B-Language
,	O
the	O
parentheses	O
after	O
the	O
function	O
's	O
name	O
can	O
be	O
omitted	O
.	O
</s>
<s>
Calls	O
to	O
a	O
function	O
with	O
trailing	O
closures	B-Language
must	O
be	O
parenthesized	O
if	O
used	O
in	O
a	O
guard	B-Language
statement	I-Language
.	O
</s>
<s>
Under	O
the	O
Cocoa	B-Operating_System
and	O
Cocoa	B-Operating_System
Touch	I-Operating_System
environments	O
,	O
many	O
common	O
classes	O
were	O
part	O
of	O
the	O
Foundation	B-Operating_System
Kit	I-Operating_System
library	O
.	O
</s>
<s>
This	O
included	O
the	O
NSString	O
string	O
library	O
(	O
using	O
Unicode	O
,	O
UTF-8	O
in	O
Swift	B-Application
5	O
,	O
changed	O
from	O
UTF-16	O
)	O
,	O
the	O
NSArray	O
and	O
NSDictionary	O
collection	O
classes	O
,	O
and	O
others	O
.	O
</s>
<s>
Objective-C	B-Language
provided	O
various	O
bits	O
of	O
syntactic	O
sugar	O
to	O
allow	O
some	O
of	O
these	O
objects	O
to	O
be	O
created	O
on-the-fly	O
within	O
the	O
language	O
,	O
but	O
once	O
created	O
,	O
the	O
objects	O
were	O
manipulated	O
with	O
object	O
calls	O
.	O
</s>
<s>
For	O
instance	O
,	O
in	O
Objective-C	B-Language
concatenating	O
two	O
NSStrings	O
required	O
method	B-Language
calls	I-Language
similar	O
to	O
this	O
:	O
</s>
<s>
In	O
Swift	B-Application
,	O
many	O
of	O
these	O
basic	O
types	O
have	O
been	O
promoted	O
to	O
the	O
language	O
's	O
core	O
,	O
and	O
can	O
be	O
manipulated	O
directly	O
.	O
</s>
<s>
Swift	B-Application
supports	O
five	O
access	B-Application
control	I-Application
levels	O
for	O
symbols	O
:	O
,	O
,	O
,	O
,	O
and	O
.	O
</s>
<s>
Unlike	O
many	O
object-oriented	B-Language
languages	I-Language
,	O
these	O
access	O
controls	O
ignore	O
inheritance	B-Language
hierarchies	I-Language
:	O
indicates	O
that	O
a	O
symbol	O
is	O
accessible	O
only	O
in	O
the	O
immediate	O
scope	B-Language
,	O
indicates	O
it	O
is	O
accessible	O
only	O
from	O
within	O
the	O
file	O
,	O
indicates	O
it	O
is	O
accessible	O
within	O
the	O
containing	O
module	O
,	O
indicates	O
it	O
is	O
accessible	O
from	O
any	O
module	O
,	O
and	O
(	O
only	O
for	O
classes	O
and	O
their	O
methods	O
)	O
indicates	O
that	O
the	O
class	O
may	O
be	O
subclassed	O
outside	O
of	O
the	O
module	O
.	O
</s>
<s>
An	O
important	O
new	O
feature	O
in	O
Swift	B-Application
is	O
option	O
types	O
,	O
which	O
allow	O
references	O
or	O
values	O
to	O
operate	O
in	O
a	O
manner	O
similar	O
to	O
the	O
common	O
pattern	O
in	O
C	B-Language
,	O
where	O
a	O
pointer	O
may	O
refer	O
to	O
a	O
value	O
or	O
may	O
be	O
null	O
.	O
</s>
<s>
This	O
implies	O
that	O
non-optional	O
types	O
cannot	O
result	O
in	O
a	O
null-pointer	O
error	O
;	O
the	O
compiler	B-Language
can	O
ensure	O
this	O
is	O
not	O
possible	O
.	O
</s>
<s>
As	O
in	O
C#	B-Application
,	O
Swift	B-Application
also	O
includes	O
syntactic	O
sugar	O
for	O
this	O
,	O
allowing	O
one	O
to	O
indicate	O
a	O
variable	O
is	O
optional	O
by	O
placing	O
a	O
question	O
mark	O
after	O
the	O
type	O
name	O
,	O
var	O
optionalInteger	O
:	O
Int	O
?	O
.	O
</s>
<s>
operator	O
unwraps	O
anOptionalInstance	O
to	O
expose	O
the	O
instance	O
inside	O
,	O
allowing	O
the	O
method	B-Language
call	I-Language
to	O
be	O
made	O
on	O
it	O
.	O
</s>
<s>
This	O
can	O
be	O
annoying	O
in	O
practice	O
,	O
so	O
Swift	B-Application
also	O
includes	O
the	O
concept	O
of	O
optional	O
chaining	O
to	O
test	O
whether	O
the	O
instance	O
is	O
nil	O
and	O
then	O
unwrap	O
it	O
if	O
it	O
is	O
non-null	O
:	O
</s>
<s>
Swift	B-Application
2	O
introduced	O
the	O
new	O
keyword	O
guard	O
for	O
cases	O
in	O
which	O
code	O
should	O
stop	O
executing	O
if	O
some	O
condition	O
is	O
unmet	O
:	O
</s>
<s>
Also	O
,	O
since	O
guard	O
contains	O
no	O
scope	B-Language
,	O
with	O
exception	O
of	O
the	O
else	O
closure	B-Language
,	O
leaseStart	O
is	O
presented	O
as	O
an	O
unwrapped	O
optional	O
to	O
the	O
guard	O
's	O
super-scope	O
.	O
</s>
<s>
Lastly	O
,	O
if	O
the	O
guard	B-Language
statement	I-Language
's	O
test	O
fails	O
,	O
Swift	B-Application
requires	O
the	O
else	O
to	O
exit	O
the	O
current	O
method	O
or	O
loop	O
,	O
ensuring	O
leaseStart	O
never	O
is	O
accessed	O
when	O
nil	O
.	O
</s>
<s>
Objective-C	B-Language
was	O
weakly	O
typed	O
and	O
allowed	O
any	O
method	O
to	O
be	O
called	O
on	O
any	O
object	O
at	O
any	O
time	O
.	O
</s>
<s>
If	O
the	O
method	B-Language
call	I-Language
failed	O
,	O
there	O
was	O
a	O
default	O
handler	O
in	O
the	O
runtime	O
that	O
returned	O
nil	O
.	O
</s>
<s>
That	O
meant	O
that	O
no	O
unwrapping	O
or	O
testing	O
was	O
needed	O
,	O
the	O
equivalent	O
statement	O
in	O
Objective-C	B-Language
:	O
</s>
<s>
However	O
,	O
this	O
also	O
demanded	O
that	O
all	O
method	B-Language
calls	I-Language
be	O
dynamic	O
,	O
which	O
introduces	O
significant	O
overhead	O
.	O
</s>
<s>
Swift	B-Application
's	O
use	O
of	O
optionals	O
provides	O
a	O
similar	O
mechanism	O
for	O
testing	O
and	O
dealing	O
with	O
nils	O
,	O
but	O
does	O
so	O
in	O
a	O
way	O
that	O
allows	O
the	O
compiler	B-Language
to	O
use	O
static	B-Language
dispatch	I-Language
because	O
the	O
unwrapping	O
action	O
is	O
called	O
on	O
a	O
defined	O
instance	O
(	O
the	O
wrapper	O
)	O
,	O
versus	O
occurring	O
in	O
the	O
runtime	O
dispatch	O
system	O
.	O
</s>
<s>
In	O
many	O
object-oriented	B-Language
languages	I-Language
,	O
objects	O
are	O
represented	O
internally	O
in	O
two	O
parts	O
.	O
</s>
<s>
The	O
object	O
is	O
stored	O
as	O
a	O
block	O
of	O
data	O
placed	O
on	O
the	O
heap	B-Application
,	O
while	O
the	O
name	O
(	O
or	O
"	O
handle	O
"	O
)	O
to	O
that	O
object	O
is	O
represented	O
by	O
a	O
pointer	O
.	O
</s>
<s>
Objects	O
are	O
passed	O
between	O
methods	O
by	O
copying	O
the	O
value	O
of	O
the	O
pointer	O
,	O
allowing	O
the	O
same	O
underlying	O
data	O
on	O
the	O
heap	B-Application
to	O
be	O
accessed	O
by	O
anyone	O
with	O
a	O
copy	O
.	O
</s>
<s>
Similarly	O
to	O
C#	B-Application
and	O
in	O
contrast	O
to	O
most	O
other	O
OO	O
languages	O
,	O
Swift	B-Application
offers	O
built-in	O
support	O
for	O
objects	O
using	O
either	O
pass-by-reference	O
or	O
pass-by-value	O
semantics	O
,	O
the	O
former	O
using	O
the	O
class	O
declaration	O
and	O
the	O
latter	O
using	O
struct	B-Application
.	O
</s>
<s>
Structs	B-Application
in	O
Swift	B-Application
have	O
almost	O
all	O
the	O
same	O
features	O
as	O
classes	O
:	O
methods	O
,	O
implementing	O
protocols	B-Application
and	O
using	O
the	O
extension	O
mechanisms	O
.	O
</s>
<s>
Structs	B-Application
do	O
not	O
support	O
inheritance	B-Language
,	O
however	O
.	O
</s>
<s>
Smaller	O
structures	O
,	O
like	O
a	O
2D	O
point	O
,	O
can	O
be	O
defined	O
as	O
structs	B-Application
,	O
which	O
will	O
be	O
pass-by-value	O
and	O
allow	O
direct	O
access	O
to	O
their	O
internal	O
data	O
with	O
no	O
dereference	O
.	O
</s>
<s>
The	O
performance	O
improvement	O
inherent	O
to	O
the	O
pass-by-value	O
concept	O
is	O
such	O
that	O
Swift	B-Application
uses	O
these	O
types	O
for	O
almost	O
all	O
common	O
data	O
types	O
,	O
including	O
Int	O
and	O
Double	O
,	O
and	O
types	O
normally	O
represented	O
by	O
objects	O
,	O
like	O
String	O
and	O
Array	O
.	O
</s>
<s>
To	O
ensure	O
that	O
even	O
the	O
largest	O
structs	B-Application
do	O
not	O
cause	O
a	O
performance	O
penalty	O
when	O
they	O
are	O
handed	O
off	O
,	O
Swift	B-Application
uses	O
copy	B-Language
on	I-Language
write	I-Language
so	O
that	O
the	O
objects	O
are	O
copied	O
only	O
if	O
and	O
when	O
the	O
program	O
attempts	O
to	O
change	O
a	O
value	O
in	O
them	O
.	O
</s>
<s>
So	O
while	O
the	O
data	O
is	O
physically	O
stored	O
as	O
one	O
instance	O
in	O
memory	O
,	O
at	O
the	O
level	O
of	O
the	O
application	O
,	O
these	O
values	O
are	O
separate	O
and	O
physical	O
separation	O
is	O
enforced	O
by	O
copy	B-Language
on	I-Language
write	I-Language
only	O
if	O
needed	O
.	O
</s>
<s>
A	O
key	O
feature	O
of	O
Objective-C	B-Language
is	O
its	O
support	O
for	O
categories	O
,	O
methods	O
that	O
can	O
be	O
added	O
to	O
extend	O
classes	O
at	O
runtime	O
.	O
</s>
<s>
An	O
example	O
might	O
be	O
to	O
add	O
spell	B-Application
checker	I-Application
support	O
to	O
the	O
base	O
NSString	O
class	O
,	O
which	O
means	O
all	O
instances	O
of	O
NSString	O
in	O
the	O
application	O
gain	O
spell	B-Application
checking	I-Application
.	O
</s>
<s>
Swift	B-Application
continues	O
to	O
support	O
this	O
concept	O
,	O
although	O
they	O
are	O
now	O
termed	O
extensions	O
,	O
and	O
declared	O
with	O
the	O
keyword	O
extension	O
.	O
</s>
<s>
Unlike	O
Objective-C	B-Language
,	O
Swift	B-Application
can	O
also	O
add	O
new	O
properties	O
accessors	O
,	O
types	O
,	O
and	O
enums	B-Language
to	O
extant	O
instances	O
.	O
</s>
<s>
Another	O
key	O
feature	O
of	O
Objective-C	B-Language
is	O
its	O
use	O
of	O
protocols	B-Application
,	O
known	O
in	O
most	O
modern	O
languages	O
as	O
interfaces	O
.	O
</s>
<s>
Protocols	B-Application
promise	O
that	O
a	O
particular	O
class	O
implements	O
a	O
set	O
of	O
methods	O
,	O
meaning	O
that	O
other	O
objects	O
in	O
the	O
system	O
can	O
call	O
those	O
methods	O
on	O
any	O
object	O
supporting	O
that	O
protocol	B-Application
.	O
</s>
<s>
This	O
is	O
often	O
used	O
in	O
modern	O
OO	O
languages	O
as	O
a	O
substitute	O
for	O
multiple	B-Application
inheritance	I-Application
,	O
although	O
the	O
feature	O
sets	O
are	O
not	O
entirely	O
similar	O
.	O
</s>
<s>
A	O
common	O
example	O
of	O
a	O
protocol	B-Application
in	O
Cocoa	B-Operating_System
is	O
the	O
NSCopying	O
protocol	B-Application
,	O
which	O
defines	O
one	O
method	O
,	O
copyWithZone	O
,	O
that	O
implements	O
deep	O
copying	O
on	O
objects	O
.	O
</s>
<s>
In	O
Objective-C	B-Language
,	O
and	O
most	O
other	O
languages	O
implementing	O
the	O
protocol	B-Application
concept	O
,	O
it	O
is	O
up	O
to	O
the	O
programmer	O
to	O
ensure	O
that	O
the	O
required	O
methods	O
are	O
implemented	O
in	O
each	O
class	O
.	O
</s>
<s>
Swift	B-Application
adds	O
the	O
ability	O
to	O
add	O
these	O
methods	O
using	O
extensions	O
,	O
and	O
to	O
use	O
generic	B-Language
programming	I-Language
(	O
generics	O
)	O
to	O
implement	O
them	O
.	O
</s>
<s>
Combined	O
,	O
these	O
allow	O
protocols	B-Application
to	O
be	O
written	O
once	O
and	O
support	O
a	O
wide	O
variety	O
of	O
instances	O
.	O
</s>
<s>
Also	O
,	O
the	O
extension	O
mechanism	O
can	O
be	O
used	O
to	O
add	O
protocol	B-Application
conformance	O
to	O
an	O
object	O
that	O
does	O
not	O
list	O
that	O
protocol	B-Application
in	O
its	O
definition	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
protocol	B-Application
might	O
be	O
declared	O
called	O
StringConvertible	O
,	O
which	O
ensures	O
that	O
instances	O
that	O
conform	O
to	O
the	O
protocol	B-Application
implement	O
a	O
toString	B-Language
method	O
that	O
returns	O
a	O
String	O
.	O
</s>
<s>
In	O
Swift	B-Application
,	O
this	O
can	O
be	O
declared	O
with	O
code	O
like	O
this	O
:	O
</s>
<s>
This	O
protocol	B-Application
can	O
now	O
be	O
added	O
to	O
String	O
,	O
without	O
modifying	O
the	O
base	O
class	O
's	O
source	O
code	O
:	O
</s>
<s>
In	O
Swift	B-Application
,	O
like	O
many	O
modern	O
languages	O
supporting	O
interfaces	O
,	O
protocols	B-Application
can	O
be	O
used	O
as	O
types	O
,	O
which	O
means	O
variables	O
and	O
methods	O
can	O
be	O
defined	O
by	O
protocol	B-Application
instead	O
of	O
their	O
specific	O
type	O
:	O
</s>
<s>
It	O
does	O
not	O
matter	O
what	O
sort	O
of	O
instance	O
someSortOfPrintableObject	O
is	O
,	O
the	O
compiler	B-Language
will	O
ensure	O
that	O
it	O
conforms	O
to	O
the	O
protocol	B-Application
and	O
thus	O
this	O
code	O
is	O
safe	O
.	O
</s>
<s>
This	O
syntax	O
also	O
means	O
that	O
collections	O
can	O
be	O
based	O
on	O
protocols	B-Application
also	O
,	O
like	O
let	O
printableArray	O
=	O
 [ StringConvertible ] 	O
.	O
</s>
<s>
As	O
Swift	B-Application
treats	O
structs	B-Application
and	O
classes	O
as	O
similar	O
concepts	O
,	O
both	O
extensions	O
and	O
protocols	B-Application
are	O
extensively	O
used	O
in	O
Swift	B-Application
's	O
runtime	O
to	O
provide	O
a	O
rich	O
API	O
based	O
on	O
structs	B-Application
.	O
</s>
<s>
For	O
instance	O
,	O
Swift	B-Application
uses	O
an	O
extension	O
to	O
add	O
the	O
Equatable	O
protocol	B-Application
to	O
many	O
of	O
their	O
basic	O
types	O
,	O
like	O
Strings	O
and	O
Arrays	B-Data_Structure
,	O
allowing	O
them	O
to	O
be	O
compared	O
with	O
the	O
==	O
operator	O
.	O
</s>
<s>
A	O
concrete	O
example	O
of	O
how	O
all	O
of	O
these	O
features	O
interact	O
can	O
be	O
seen	O
in	O
the	O
concept	O
of	O
default	O
protocol	B-Application
implementations	O
:	O
</s>
<s>
Any	O
instance	O
,	O
class	O
or	O
struct	B-Application
,	O
automatically	O
gains	O
this	O
implementation	O
simply	O
by	O
conforming	O
to	O
Equatable	O
.	O
</s>
<s>
This	O
combination	O
of	O
protocols	B-Application
,	O
defaults	O
,	O
protocol	B-Application
inheritance	B-Language
,	O
and	O
extensions	O
allows	O
many	O
of	O
the	O
functions	O
normally	O
associated	O
with	O
classes	O
and	O
inheritance	B-Language
to	O
be	O
implemented	O
on	O
value	O
types	O
.	O
</s>
<s>
This	O
concept	O
is	O
so	O
widely	O
used	O
within	O
Swift	B-Application
that	O
Apple	O
has	O
begun	O
calling	O
it	O
a	O
protocol-oriented	B-Application
programming	O
language	O
.	O
</s>
<s>
They	O
suggest	O
addressing	O
many	O
of	O
the	O
problem	O
domains	O
normally	O
solved	O
through	O
classes	O
and	O
inheritance	B-Language
using	O
protocols	B-Application
and	O
structs	B-Application
instead	O
.	O
</s>
<s>
On	O
Apple	O
systems	O
,	O
Swift	B-Application
uses	O
the	O
same	O
runtime	O
as	O
the	O
extant	O
Objective-C	B-Language
system	O
,	O
but	O
requires	O
iOS	B-Application
7	O
or	O
macOS	B-Application
10.9	O
or	O
higher	O
.	O
</s>
<s>
It	O
also	O
depends	O
on	O
Grand	B-Operating_System
Central	I-Operating_System
Dispatch	I-Operating_System
.	O
</s>
<s>
Swift	B-Application
and	O
Objective-C	B-Language
code	O
can	O
be	O
used	O
in	O
one	O
program	O
,	O
and	O
by	O
extension	O
,	O
C	B-Language
and	O
C++	B-Language
also	O
.	O
</s>
<s>
In	O
contrast	O
to	O
C	B-Language
,	O
C++	B-Language
code	I-Language
cannot	O
be	O
used	O
directly	O
from	O
Swift	B-Application
.	O
</s>
<s>
An	O
Objective-C	B-Language
or	O
C	B-Language
wrapper	O
must	O
be	O
created	O
between	O
Swift	B-Application
and	O
C++	B-Language
.	O
</s>
<s>
In	O
the	O
case	O
of	O
Objective-C	B-Language
,	O
Swift	B-Application
has	O
considerable	O
access	O
to	O
the	O
object	O
model	O
,	O
and	O
can	O
be	O
used	O
to	O
subclass	O
,	O
extend	O
and	O
use	O
Objective-C	B-Language
code	O
to	O
provide	O
protocol	B-Application
support	O
.	O
</s>
<s>
The	O
converse	O
is	O
not	O
true	O
:	O
a	O
Swift	B-Application
class	O
cannot	O
be	O
subclassed	O
in	O
Objective-C	B-Language
.	O
</s>
<s>
To	O
aid	O
development	O
of	O
such	O
programs	O
,	O
and	O
the	O
re-use	O
of	O
extant	O
code	O
,	O
Xcode	B-Operating_System
6	O
and	O
higher	O
offers	O
a	O
semi-automated	O
system	O
that	O
builds	O
and	O
maintains	O
a	O
bridging	O
header	O
to	O
expose	O
Objective-C	B-Language
code	O
to	O
Swift	B-Application
.	O
</s>
<s>
This	O
takes	O
the	O
form	O
of	O
an	O
additional	O
header	B-Language
file	I-Language
that	O
simply	O
defines	O
or	O
imports	O
all	O
of	O
the	O
Objective-C	B-Language
symbols	O
that	O
are	O
needed	O
by	O
the	O
project	O
's	O
Swift	B-Application
code	O
.	O
</s>
<s>
At	O
that	O
point	O
,	O
Swift	B-Application
can	O
refer	O
to	O
the	O
types	O
,	O
functions	O
,	O
and	O
variables	O
declared	O
in	O
those	O
imports	O
as	O
though	O
they	O
were	O
written	O
in	O
Swift	B-Application
.	O
</s>
<s>
Objective-C	B-Language
code	O
can	O
also	O
use	O
Swift	B-Application
code	O
directly	O
,	O
by	O
importing	O
an	O
automatically	O
maintained	O
header	B-Language
file	I-Language
with	O
Objective-C	B-Language
declarations	O
of	O
the	O
project	O
's	O
Swift	B-Application
symbols	O
.	O
</s>
<s>
For	O
instance	O
,	O
an	O
Objective-C	B-Language
file	O
in	O
a	O
mixed	O
project	O
called	O
"	O
MyApp	O
"	O
could	O
access	O
Swift	B-Application
classes	O
or	O
functions	O
with	O
the	O
code	O
#import	O
"	O
MyApp-Swift.h	O
"	O
.	O
</s>
<s>
Not	O
all	O
symbols	O
are	O
available	O
through	O
this	O
mechanism	O
,	O
however	O
—	O
use	O
of	O
Swift-specific	O
features	O
like	O
generic	B-Language
types	I-Language
,	O
non-object	O
optional	O
types	O
,	O
sophisticated	O
enums	B-Language
,	O
or	O
even	O
Unicode	O
identifiers	O
may	O
render	O
a	O
symbol	O
inaccessible	O
from	O
Objective-C	B-Language
.	O
</s>
<s>
Swift	B-Application
also	O
has	O
limited	O
support	O
for	O
attributes	O
,	O
metadata	O
that	O
is	O
read	O
by	O
the	O
development	O
environment	O
,	O
and	O
is	O
not	O
necessarily	O
part	O
of	O
the	O
compiled	B-Language
code	O
.	O
</s>
<s>
Like	O
Objective-C	B-Language
,	O
attributes	O
use	O
the	O
@	O
syntax	O
,	O
but	O
the	O
currently	O
available	O
set	O
is	O
small	O
.	O
</s>
<s>
On	O
non-Apple	O
systems	O
,	O
Swift	B-Application
does	O
not	O
depend	O
on	O
an	O
Objective-C	B-Language
runtime	O
or	O
other	O
Apple	O
system	O
libraries	O
;	O
a	O
set	O
of	O
Swift	B-Application
"	O
Corelib	O
"	O
implementations	O
replace	O
them	O
.	O
</s>
<s>
These	O
include	O
a	O
"	O
swift-corelibs-foundation	O
"	O
to	O
stand	O
in	O
for	O
the	O
Foundation	B-Operating_System
Kit	I-Operating_System
,	O
a	O
"	O
swift-corelibs-libdispatch	O
"	O
to	O
stand	O
in	O
for	O
the	O
Grand	B-Operating_System
Central	I-Operating_System
Dispatch	I-Operating_System
,	O
and	O
an	O
"	O
swift-corelibs-xctest	O
"	O
to	O
stand	O
in	O
for	O
the	O
XCTest	O
APIs	O
from	O
Xcode	B-Operating_System
.	O
</s>
<s>
As	O
of	O
2019	O
,	O
with	O
Xcode	B-Operating_System
11	O
,	O
Apple	O
has	O
also	O
added	O
a	O
major	O
new	O
UI	O
paradigm	O
called	O
SwiftUI	O
.	O
</s>
<s>
SwiftUI	O
replaces	O
the	O
older	O
Interface	O
Builder	O
paradigm	O
with	O
a	O
new	O
declarative	B-Language
development	O
paradigm	O
.	O
</s>
<s>
Swift	B-Application
uses	O
Automatic	B-Language
Reference	I-Language
Counting	I-Language
(	O
ARC	O
)	O
to	O
manage	B-General_Concept
memory	I-General_Concept
.	O
</s>
<s>
Apple	O
used	O
to	O
require	O
manual	O
memory	B-General_Concept
management	I-General_Concept
in	O
Objective-C	B-Language
,	O
but	O
introduced	O
ARC	O
in	O
2011	O
to	O
allow	O
for	O
easier	O
memory	B-General_Concept
allocation	I-General_Concept
and	O
deallocation	B-General_Concept
.	O
</s>
<s>
Swift	B-Application
provides	O
the	O
keywords	O
weak	O
and	O
unowned	O
to	O
prevent	O
strong	O
reference	O
cycles	O
.	O
</s>
<s>
A	O
closure	B-Language
within	O
a	O
class	O
can	O
also	O
create	O
a	O
strong	O
reference	O
cycle	O
by	O
capturing	O
self	O
references	O
.	O
</s>
<s>
A	O
key	O
element	O
of	O
the	O
Swift	B-Application
system	O
is	O
its	O
ability	O
to	O
be	O
cleanly	O
debugged	O
and	O
run	O
within	O
the	O
development	O
environment	O
,	O
using	O
a	O
read	B-Application
–	I-Application
eval	I-Application
–	I-Application
print	I-Application
loop	I-Application
(	O
REPL	B-Application
)	O
,	O
giving	O
it	O
interactive	O
properties	O
more	O
in	O
common	O
with	O
the	O
scripting	O
abilities	O
of	O
Python	B-Language
than	O
traditional	O
system	B-Application
programming	I-Application
languages	O
.	O
</s>
<s>
The	O
REPL	B-Application
is	O
further	O
enhanced	O
with	O
playgrounds	B-Operating_System
,	O
interactive	O
views	O
running	O
within	O
the	O
Xcode	B-Operating_System
environment	O
that	O
respond	O
to	O
code	O
or	O
debugger	O
changes	O
on-the-fly	O
.	O
</s>
<s>
Playgrounds	B-Operating_System
allow	O
programmers	O
to	O
add	O
in	O
Swift	B-Application
code	O
along	O
with	O
markdown	O
documentation	O
.	O
</s>
<s>
In	O
addition	O
,	O
Xcode	B-Operating_System
has	O
debugging	O
features	O
for	O
Swift	B-Application
development	O
including	O
breakpoints	O
,	O
step	O
through	O
and	O
step	O
over	O
statements	O
,	O
as	O
well	O
as	O
UI	O
element	O
placement	O
breakdowns	O
for	O
app	B-Application
developers	O
.	O
</s>
<s>
Apple	O
says	O
that	O
Swift	B-Application
is	O
"	O
an	O
industrial-quality	O
programming	O
language	O
that	O
's	O
as	O
expressive	O
and	O
enjoyable	O
as	O
a	O
scripting	O
language	O
"	O
.	O
</s>
<s>
Many	O
of	O
the	O
features	O
introduced	O
with	O
Swift	B-Application
have	O
well-known	O
performance	O
and	O
safety	O
trade-offs	O
.	O
</s>
<s>
Apple	O
has	O
implemented	O
optimizations	B-Application
that	O
reduce	O
this	O
overhead	O
.	O
</s>
<s>
Swift	B-Application
is	O
considered	O
a	O
C	B-Language
family	I-Language
programming	I-Language
language	I-Language
and	O
is	O
similar	O
to	O
C	B-Language
in	O
various	O
ways	O
:	O
</s>
<s>
Most	O
C	B-Language
operators	O
are	O
used	O
in	O
Swift	B-Application
,	O
but	O
there	O
are	O
some	O
new	O
operators	O
,	O
for	O
example	O
to	O
support	O
integer	O
operations	O
with	O
overflow	O
(	O
see	O
under	O
differences	O
)	O
.	O
</s>
<s>
Control	O
statements	O
while	O
,	O
if	O
,	O
and	O
switch	O
are	O
similar	O
,	O
but	O
have	O
extended	O
functions	O
,	O
e.g.	O
,	O
a	O
switch	O
that	O
takes	O
non-integer	O
cases	O
,	O
while	O
and	O
if	O
supporting	O
pattern	B-Language
matching	I-Language
and	O
conditionally	O
unwrapping	O
optionals	O
,	O
for	O
uses	O
the	O
syntax	O
.	O
</s>
<s>
Square	O
brackets	O
are	O
used	O
with	O
arrays	B-Data_Structure
,	O
both	O
to	O
declare	O
them	O
and	O
to	O
get	O
a	O
value	O
at	O
a	O
given	O
index	O
in	O
one	O
of	O
them	O
.	O
</s>
<s>
It	O
also	O
has	O
similarities	O
to	O
Objective-C	B-Language
:	O
</s>
<s>
Class	O
methods	O
are	O
inherited	O
,	O
like	O
instance	B-Language
methods	I-Language
;	O
self	O
in	O
class	O
methods	O
is	O
the	O
class	O
the	O
method	O
was	O
called	O
on	O
.	O
</s>
<s>
Similar	O
for	O
...	O
in	O
enumeration	B-Language
syntax	O
.	O
</s>
<s>
Differences	O
from	O
Objective-C	B-Language
include	O
:	O
</s>
<s>
No	O
header	B-Language
files	I-Language
.	O
</s>
<s>
Generic	B-Language
programming	I-Language
.	O
</s>
<s>
Functions	O
are	O
first-class	B-Application
objects	O
.	O
</s>
<s>
Enumeration	B-Language
cases	O
can	O
have	O
associated	O
data	O
(	O
algebraic	O
data	O
types	O
)	O
.	O
</s>
<s>
No	O
exception	B-General_Concept
handling	I-General_Concept
.	O
</s>
<s>
Swift	B-Application
2	O
introduces	O
a	O
different	O
and	O
incompatible	O
error-handling	O
model	O
.	O
</s>
<s>
Several	O
features	O
of	O
earlier	O
C-family	B-Language
languages	I-Language
that	O
are	O
easy	O
to	O
misuse	O
have	O
been	O
removed	O
:	O
</s>
<s>
This	O
prevents	O
the	O
common	O
error	O
of	O
writing	O
i	O
=	O
0	O
instead	O
of	O
i	O
==	O
0	O
by	O
throwing	O
a	O
compile-time	O
error	O
.	O
</s>
<s>
Integer	B-Error_Name
overflows	I-Error_Name
,	O
which	O
result	O
in	O
undefined	B-Language
behavior	I-Language
for	O
signed	O
integers	O
in	O
C	B-Language
,	O
are	O
trapped	O
as	O
a	O
run-time	O
error	O
in	O
Swift	B-Application
.	O
</s>
<s>
The	O
properties	O
min	O
and	O
max	O
are	O
defined	O
in	O
Swift	B-Application
for	O
all	O
integer	O
types	O
and	O
can	O
be	O
used	O
to	O
safely	O
check	O
for	O
potential	O
overflows	O
,	O
versus	O
relying	O
on	O
constants	O
defined	O
for	O
each	O
type	O
in	O
external	O
libraries	O
.	O
</s>
<s>
C-style	O
enumeration	B-Language
for	O
(	O
int	O
i	O
=	O
0	O
;	O
i	O
<	O
c	B-Language
;	O
i++	O
)	O
,	O
which	O
is	O
prone	O
to	O
off-by-one	B-Error_Name
errors	I-Error_Name
,	O
is	O
unsupported	O
(	O
from	O
Swift	B-Application
3	O
onward	O
)	O
.	O
</s>
<s>
The	O
pre	O
-	O
and	O
post	O
-	O
increment	O
and	O
decrement	O
operators	O
(	O
i++	O
,	O
--i	O
...	O
)	O
are	O
unsupported	O
(	O
from	O
Swift	B-Application
3	O
onward	O
)	O
,	O
more	O
so	O
since	O
C-style	O
for	O
statements	O
are	O
also	O
unsupported	O
from	O
Swift	B-Application
3	O
onward	O
.	O
</s>
<s>
Since	O
the	O
language	O
is	O
open-source	B-Application
,	O
there	O
are	O
prospects	O
of	O
it	O
being	O
ported	O
to	O
the	O
web	O
.	O
</s>
<s>
Some	O
web	O
frameworks	B-Architecture
have	O
already	O
been	O
developed	O
,	O
such	O
as	O
IBM	O
's	O
Kitura	B-Application
,	O
Perfect	B-Application
and	O
Vapor	B-Application
.	O
</s>
<s>
An	O
official	O
"	O
Server	O
APIs	O
"	O
work	O
group	O
has	O
also	O
been	O
started	O
by	O
Apple	O
,	O
with	O
members	O
of	O
the	O
Swift	B-Application
developer	O
community	O
playing	O
a	O
central	O
role	O
.	O
</s>
<s>
A	O
second	O
free	O
implementation	O
of	O
Swift	B-Application
that	O
targets	O
Cocoa	B-Operating_System
,	O
Microsoft	O
's	O
Common	O
Language	O
Infrastructure	O
(	O
.NET	B-Application
)	O
,	O
and	O
the	O
Java	B-Device
and	O
Android	B-Application
platform	I-Application
exists	O
as	O
part	O
of	O
the	O
Elements	O
Compiler	B-Language
from	O
RemObjects	O
Software	O
.	O
</s>
<s>
By	O
combining	O
toolchains	B-General_Concept
from	O
LLVM	B-Application
and	O
Macintosh	B-Operating_System
Programmer	I-Operating_System
's	I-Operating_System
Workshop	I-Operating_System
,	O
it	O
is	O
possible	O
to	O
run	O
a	O
very	O
small	O
subset	O
of	O
the	O
language	O
on	O
Mac	B-Operating_System
OS	I-Operating_System
9	I-Operating_System
.	O
</s>
