<s>
A	O
property	O
,	O
in	O
some	O
object-oriented	B-Language
programming	I-Language
languages	I-Language
,	O
is	O
a	O
special	O
sort	O
of	O
class	O
member	O
,	O
intermediate	O
in	O
functionality	O
between	O
a	O
field	B-Application
(	O
or	O
data	B-Application
member	I-Application
)	O
and	O
a	O
method	B-Language
.	O
</s>
<s>
The	O
syntax	O
for	O
reading	O
and	O
writing	O
of	O
properties	O
is	O
like	O
for	O
fields	O
,	O
but	O
property	O
reads	O
and	O
writes	O
are	O
(	O
usually	O
)	O
translated	O
to	O
'	O
getter	O
 '	O
and	O
'	O
setter	O
 '	O
method	B-Language
calls	I-Language
.	O
</s>
<s>
The	O
field-like	O
syntax	O
is	O
easier	O
to	O
read	O
and	O
write	O
than	O
many	O
method	B-Language
calls	I-Language
,	O
yet	O
the	O
interposition	O
of	O
method	B-Language
calls	I-Language
"	O
under	O
the	O
hood	O
"	O
allows	O
for	O
data	O
validation	O
,	O
active	B-General_Concept
updating	I-General_Concept
(	O
e.g.	O
,	O
of	O
GUI	B-Application
elements	O
)	O
,	O
or	O
implementation	O
of	O
what	O
may	O
be	O
called	O
"	O
read-only	O
fields	O
"	O
.	O
</s>
<s>
See	O
an	O
instructive	O
example	O
for	O
C#	B-Application
language	O
below	O
.	O
</s>
<s>
Programming	O
languages	O
that	O
support	O
properties	O
include	O
ActionScript	O
3	O
,	O
C#	B-Application
,	O
D	B-Application
,	O
Delphi/Free	O
Pascal	O
,	O
eC	B-Language
,	O
F#	B-Operating_System
,	O
Kotlin	B-Language
,	O
JavaScript	B-Language
,	O
Objective-C	O
2.0	O
,	O
Python	B-Language
,	O
Scala	B-Application
,	O
Swift	B-Application
,	O
Lua	B-Language
,	O
and	O
Visual	B-Language
Basic	I-Language
.	O
</s>
<s>
Some	O
object-oriented	B-Language
languages	I-Language
,	O
such	O
as	O
Java	B-Language
and	O
C++	B-Language
,	O
do	O
not	O
support	O
properties	O
,	O
requiring	O
the	O
programmer	O
to	O
define	O
a	O
pair	O
of	O
accessor	O
and	O
mutator	O
methods	O
instead	O
.	O
</s>
<s>
Oberon-2	B-Language
provides	O
an	O
alternative	O
mechanism	O
using	O
object	O
variable	O
visibility	O
flags	O
.	O
</s>
<s>
Other	O
languages	O
designed	O
for	O
the	O
Java	B-Language
Virtual	I-Language
Machine	I-Language
,	O
such	O
as	O
Groovy	B-Application
,	O
natively	O
support	O
properties	O
.	O
</s>
<s>
While	O
C++	B-Language
does	O
not	O
have	O
first	O
class	O
properties	O
,	O
they	O
can	O
be	O
emulated	O
with	O
operator	O
overloading	O
.	O
</s>
<s>
Also	O
note	O
that	O
some	O
C++	B-Language
compilers	O
support	O
first	O
class	O
properties	O
as	O
language	O
extensions	O
.	O
</s>
<s>
In	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
,	O
GCC	B-Application
,	O
and	O
llvm/clang	B-Application
,	O
the	O
__declspec(property )	O
creates	O
properties	O
similar	O
to	O
C#	B-Application
.	O
</s>
<s>
Borland	B-Application
C++	I-Application
and	O
Borland/CodeGear/Embarcadero	B-Language
C++Builder	I-Language
use	O
the	O
__property	O
keyword	O
.	O
</s>
<s>
In	O
many	O
object	B-Language
oriented	I-Language
languages	I-Language
properties	O
are	O
implemented	O
as	O
a	O
pair	O
of	O
accessor/mutator	O
methods	O
,	O
but	O
accessed	O
using	O
the	O
same	O
syntax	O
as	O
for	O
public	O
fields	O
.	O
</s>
<s>
Omitting	O
a	O
method	B-Language
from	O
the	O
pair	O
yields	O
a	O
read-only	O
or	O
an	O
uncommon	O
write-only	O
property	O
.	O
</s>
<s>
In	O
some	O
languages	O
with	O
no	O
built-in	O
support	O
for	O
properties	O
,	O
a	O
similar	O
construct	O
can	O
be	O
implemented	O
as	O
a	O
single	O
method	B-Language
that	O
either	O
returns	O
or	O
changes	O
the	O
underlying	O
data	O
,	O
depending	O
on	O
the	O
context	O
of	O
its	O
invocation	O
.	O
</s>
<s>
in	O
Perl	B-Language
.	O
</s>
<s>
Some	O
languages	O
(	O
Ruby	B-Language
,	O
Smalltalk	B-Application
)	O
achieve	O
property-like	O
syntax	O
using	O
normal	O
methods	O
,	O
sometimes	O
with	O
a	O
limited	O
amount	O
of	O
syntactic	O
sugar	O
.	O
</s>
<s>
The	O
following	O
example	O
demonstrates	O
dot	B-Language
notation	I-Language
in	O
JavaScript	B-Language
.	O
</s>
<s>
The	O
following	O
example	O
demonstrates	O
bracket	O
notation	O
in	O
JavaScript	B-Language
.	O
</s>
<s>
Recent	O
C#	B-Application
versions	O
also	O
allow	O
"	O
auto-implemented	O
properties	O
"	O
where	O
the	O
backing	O
field	B-Application
for	O
the	O
property	O
is	O
generated	O
by	O
the	O
compiler	O
during	O
compilation	O
.	O
</s>
<s>
C++	B-Language
does	O
not	O
have	O
first	O
class	O
properties	O
,	O
but	O
there	O
exist	O
several	O
ways	O
to	O
emulate	O
properties	O
to	O
a	O
limited	O
degree	O
.	O
</s>
<s>
In	O
D	B-Application
version	O
2	O
,	O
each	O
property	O
accessor	O
or	O
mutator	O
must	O
be	O
marked	O
with	O
@property	O
:	O
</s>
<s>
The	O
above	O
example	O
could	O
be	O
used	O
in	O
an	O
arbitrary	O
method	B-Language
like	O
this	O
:	O
</s>
<s>
Properties	O
only	O
work	O
correctly	O
for	O
new-style	O
classes	O
(	O
classes	O
that	O
have	O
object	O
as	O
a	O
superclass	O
)	O
,	O
and	O
are	O
only	O
available	O
in	O
Python	B-Language
2.2	O
and	O
newer	O
(	O
see	O
)	O
.	O
</s>
<s>
Python	B-Language
2.6	O
added	O
a	O
new	O
syntax	O
involving	O
decorators	O
for	O
defining	O
properties	O
.	O
</s>
<s>
Ruby	B-Language
also	O
provides	O
automatic	O
getter/setter	O
synthesizers	O
defined	O
as	O
instance	B-Language
methods	I-Language
of	O
Class	O
.	O
</s>
