<s>
This	O
comparison	B-Application
of	I-Application
programming	I-Application
languages	I-Application
compares	O
how	O
object-oriented	B-Language
programming	I-Language
languages	I-Language
such	O
as	O
C++	B-Language
,	O
Java	B-Language
,	O
Smalltalk	B-Application
,	O
Object	B-Language
Pascal	I-Language
,	O
Perl	B-Language
,	O
Python	B-Language
,	O
and	O
others	O
manipulate	O
data	B-General_Concept
structures	I-General_Concept
.	O
</s>
<s>
construction	O
destruction	O
ABAP	O
Objects	O
data	O
variable	O
type	O
ref	O
to	O
class	O
.create	O
object	O
variable	O
«	O
exporting	O
parameter	O
=	O
argument»	O
.parameter	O
=	O
argument	O
may	O
be	O
repeated	O
if	O
the	O
constructor	O
has	O
several	O
parametersSAP	O
reserved	O
to	O
himself	O
the	O
use	O
of	O
destructionThis	O
language	O
uses	O
garbage	B-General_Concept
collection	I-General_Concept
to	O
release	O
unused	O
memory	O
.	O
</s>
<s>
APL	B-Language
(	O
Dyalog	O
)	O
variable	O
←	O
⎕NEW	O
class	O
«	O
parameters»	O
⎕EX	O
'	O
variable	O
 '	O
C++	B-Language
(	O
STL	B-Application
)	O
class	O
variable«( parameters	O
)	O
»	O
;	O
orclass	O
*	O
variable	O
=	O
new	B-Language
class«( parameters	O
)	O
»	O
;	O
delete	B-Language
pointer	O
;	O
C	O
#class	O
variable	O
=	O
new	B-Language
class(parameters )	O
;	O
variable.Dispose( )	O
;	O
Java	B-Language
D	B-Application
destroy(variable )	O
;	O
eC	B-Language
class	O
«	O
instance	O
handle»	O
{	O
«	O
properties/data	O
members	O
assignments	O
,	O
instance	O
method	O
overrides»	O
}	O
delete	B-Language
instance	O
handle	O
;	O
Objective-C	B-Language
(	O
Cocoa	B-Operating_System
)	O
class	O
*	O
variable	O
=	O
[ [ 	O
class	O
alloc	O
]	O
init ]	O
;	O
or	O
class	O
*	O
variable	O
=	O
[ [ 	O
class	O
alloc	O
]	O
initWithFoo:parameter	O
«	O
bar:parameter	O
...	O
» ]	O
;	O
[	O
variable	O
release ]	O
;	O
Swift	B-Application
let	O
variable	O
=	O
class(parameters )	O
Python	B-Language
variable	O
=	O
class(parameters )	O
del	O
variable	O
(	O
Normally	O
not	O
needed	O
)	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Dim	O
variable	O
As	O
New	B-Language
class(parameters )	O
variable.Dispose( )	O
Xojo	B-Application
Dim	O
variable	O
As	O
New	B-Language
class(parameters )	O
variable	O
=	O
Nil	O
Eiffel	B-Language
create	O
variable	O
orcreate	O
«{TYPE}»	O
variable.make_foo	O
«( 	O
parameters	O
)	O
»	O
orvariable	O
:=	O
create	O
 { TYPE } 	O
orvariable	O
:=	O
create	O
{TYPE}.make_foo	O
«( 	O
parameters	O
)	O
»	O
PHP	B-Application
$variable	O
=	O
new	B-Language
class«( parameters	O
)	O
»	O
;	O
unset($variable )	O
;	O
Perl	B-Language
5	O
«	O
my	O
»$variable	O
=	O
class->new	O
«( parameters	O
)	O
»	O
;	O
undef($variable )	O
;	O
Raku	B-Application
«	O
my	O
»$variable	O
=	O
class.new	O
«( parameters	O
)	O
»	O
;	O
$	O
variable.undefine	O
;	O
Ruby	B-Language
variable	O
=	O
class.new	O
«( parameters	O
)	O
»	O
Windows	B-Application
PowerShell	I-Application
$variable	O
=	O
New-Object	O
«	O
-TypeName	O
»	O
class	O
««	O
-ArgumentList	O
»	O
parameters»	O
Remove-Variable	O
«	O
-Name	O
»	O
variable	O
OCaml	B-Language
let	O
variable	O
=	O
new	B-Language
class	O
«	O
parameters»	O
or	O
let	O
variable	O
=	O
object	O
members	O
endOCaml	O
objects	O
can	O
be	O
created	O
directly	O
without	O
going	O
through	O
a	O
class	O
.	O
</s>
<s>
F#	B-Operating_System
let	O
variable	O
=	O
«	O
new	B-Language
»	O
class( «parameters»	O
)	O
Smalltalk	B-Application
The	O
class	O
is	O
an	O
Object.Just	O
send	O
a	O
message	O
to	O
a	O
class	O
,	O
usually	O
#new	O
or	O
#new	O
:	O
,	O
and	O
many	O
others	O
,	O
for	O
example	O
:	O
</s>
<s>
val	O
obj	O
=	O
new	B-Language
Object( arg0	O
,	O
arg1	O
,	O
arg2	O
...	O
)	O
</s>
<s>
class	O
protocol	B-Application
namespace	O
ABAP	O
Objects	O
class	O
name	O
definition	O
«	O
inheriting	O
from	O
parentclass»	O
.	O
</s>
<s>
APL	B-Language
(	O
Dyalog	O
)	O
:Class	O
name	O
«	O
:parentclass	O
»	O
«	O
,	O
interfaces»	O
members:EndClass	O
:Interface	O
namemembers:EndInterface	O
:Namespace	O
namemembers:EndNamespace	O
C++	B-Language
(	O
STL	B-Application
)	O
class	O
name«	O
:	O
public	O
parentclassesThis	O
language	O
supports	O
multiple	B-Application
inheritance	I-Application
.	O
</s>
<s>
A	O
class	O
can	O
have	O
more	O
than	O
one	O
parent	O
class»	O
{	O
members	O
}	O
;	O
namespace	O
name	O
{	O
members	O
}	O
C#	B-Application
class	O
name«	O
:	O
«	O
parentclass»«	O
,	O
interfaces»»	O
{	O
members	O
}	O
interface	O
name«	O
:	O
parentinterfaces»	O
{	O
members	O
}	O
D	B-Application
module	O
name	O
;	O
members	O
eC	B-Language
class	O
name«	O
:	O
base	O
class»	O
{	O
«	O
default	O
member	O
values	O
assignments»	O
«	O
members»	O
}	O
namespace	O
name	O
;	O
Java	B-Language
class	O
name«	O
extends	O
parentclass»«	O
implements	O
interfaces»	O
{	O
members	O
}	O
interface	O
name«	O
extends	O
parentinterfaces»	O
{	O
members	O
}	O
package	O
name	O
;	O
members	O
PHP	B-Application
namespace	O
name	O
;	O
members	O
Objective-C	B-Language
@interface	O
name«	O
:	O
parentclass»Not	O
providing	O
a	O
parent	O
class	O
makes	O
the	O
class	O
a	O
root	O
class	O
.	O
</s>
<s>
One	O
should	O
generally	O
use	O
the	O
conventional	O
base	O
class	O
of	O
the	O
framework	O
one	O
is	O
using	O
,	O
which	O
is	O
NSObject	O
for	O
Cocoa	B-Operating_System
and	O
GNUstep	O
,	O
or	O
Object	O
otherwise.	O
«	O
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1»	O
{	O
instance_fields	O
}	O
method_and_property_declarations	O
@end	O
@implementation	O
name	O
method_implementations	O
@endUsually	O
the	O
@interface	O
portion	O
is	O
placed	O
into	O
a	O
header	B-Language
file	I-Language
,	O
and	O
the	O
@interface	O
portion	O
is	O
placed	O
into	O
a	O
separate	O
source	O
code	O
file	O
.	O
</s>
<s>
@protocol	O
name«xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1»	O
members	O
@end	O
Swift	B-Application
class	O
name«	O
:	O
«	O
parentclass»«	O
,	O
protocols»»	O
{	O
members	O
}	O
protocol	B-Application
name«	O
:	O
parentprotocols»	O
{	O
members	O
}	O
Python	B-Language
class	O
name«( parentclasses	O
)	O
»	O
:	O
membersIn	O
Python	B-Language
interfaces	O
are	O
classes	O
which	O
methods	O
have	O
pass	O
as	O
their	O
bodies	O
__all__	O
=	O
[	O
member1	O
,	O
member2	O
,...	O
]	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Class	O
name«	O
Inherits	O
parentclass»«	O
Implements	O
interfaces»members	O
End	O
Class	O
Interface	O
name«	O
Inherits	O
parentinterfaces»members	O
End	O
Interface	O
Namespace	O
namemembers	O
End	O
Namespace	O
Xojo	B-Application
Class	O
name«	O
Inherits	O
parentclass»«	O
Implements	O
interfaces»members	O
End	O
Class	O
Interface	O
name«	O
Inherits	O
parentinterfaces»members	O
End	O
Interface	O
Module	O
namemembers	O
End	O
Module	O
Eiffel	B-Language
class	O
name«	O
inherit	O
parentclasses»membersend	O
colspan	O
=	O
2	O
Perl	B-Language
package	O
name	O
;	O
«	O
@ISA	O
=	O
qw(parentclasses )	O
;	O
»	O
members	O
1	O
;	O
package	O
name	O
;	O
members	O
Raku	B-Application
class	O
name	O
«	O
is	O
parentclass	O
«	O
is	O
parentclass	O
...	O
»»	O
«	O
does	O
role	O
«	O
does	O
role	O
...	O
»»	O
{	O
members	O
}	O
role	O
name	O
«	O
does	O
role	O
«	O
does	O
role	O
...	O
»»	O
{	O
members	O
}	O
module	O
name	O
{	O
members	O
}	O
Ruby	B-Language
class	O
name«	O
<	O
parentclass»	O
members	O
end	O
module	O
name	O
members	O
end	O
Windows	B-Application
PowerShell	I-Application
colspan	O
=3	O
OCaml	B-Language
class	O
name	O
«	O
parameters»	O
=	O
object	O
«( 	O
self	O
)	O
»	O
«	O
inherit	O
parentclass	O
«	O
parameters»	O
«	O
inherit	O
parentclass	O
«	O
parameters»	O
...	O
»»	O
members	O
end	O
module	O
name	O
members	O
F#	B-Operating_System
type	O
name«( parameters	O
)	O
»	O
«	O
as	O
this»	O
=	O
class	O
«	O
inherit	O
parentclass«( parameters	O
)	O
»	O
«	O
as	O
base»»	O
members	O
«	O
interface	O
interface	O
with	O
implementation	O
«	O
interface	O
interface	O
with	O
implementation	O
...	O
»»	O
end	O
type	O
name	O
=	O
interface	O
members	O
end	O
namespace	O
name	O
members	O
SmalltalkThe	O
class	O
is	O
an	O
Object	O
.	O
</s>
<s>
}	O
package	O
name	O
COBOL	B-Application
CLASS-ID	O
.	O
</s>
<s>
constructor	O
destructor	B-Language
finalizerA	O
finalizer	B-Application
is	O
called	O
by	O
the	O
garbage	B-General_Concept
collector	I-General_Concept
when	O
an	O
object	O
is	O
about	O
to	O
be	O
garbage-collected	O
.	O
</s>
<s>
instructions	O
endmethod.In	O
ABAP	O
,	O
the	O
constructor	O
is	O
to	O
be	O
defined	O
like	O
a	O
method	O
(	O
see	O
comments	O
about	O
method	O
)	O
with	O
the	O
following	O
restrictions	O
:	O
the	O
method	O
name	O
must	O
be	O
"	O
constructor	O
"	O
,	O
and	O
only	O
"	O
importing	O
"	O
parameters	O
can	O
be	O
defined	O
colspan	O
=	O
2	O
APL	B-Language
(	O
Dyalog	O
)	O
∇	O
name:Implements	O
Constructor	O
«	O
:Base	O
«	O
expr»»instructions∇	O
∇	O
name:Implements	O
Destructorinstructions∇	O
C++	B-Language
(	O
STL	B-Application
)	O
class( «parameters»	O
)	O
«	O
:	O
initializersAn	O
optional	O
comma-separated	O
list	O
of	O
initializers	O
for	O
member	O
objects	O
and	O
parent	O
classes	O
goes	O
here	O
.	O
</s>
<s>
If	O
an	O
initializer	O
is	O
not	O
specified	O
for	O
a	O
member	O
or	O
parent	O
class	O
,	O
then	O
the	O
default	O
constructor	O
is	O
used.	O
»	O
{	O
instructions	O
}	O
~	O
class( )	O
{	O
instructions	O
}	O
C#	B-Application
class( «parameters»	O
)	O
{	O
instructions	O
}	O
void	O
Dispose( )	O
{	O
instructions	O
}	O
~	O
class( )	O
{	O
instructions	O
}	O
D	B-Application
this( «parameters»	O
)	O
{	O
instructions	O
}	O
~	O
this( )	O
{	O
instructions	O
}	O
eC	B-Language
class( )	O
{	O
instructions	O
}	O
~	O
class( )	O
{	O
instructions	O
}	O
Java	B-Language
class( «parameters»	O
)	O
{	O
instructions	O
}	O
void	O
finalize( )	O
{	O
instructions	O
}	O
EiffelAny	O
Eiffel	B-Language
procedure	O
can	O
be	O
used	O
as	O
a	O
creation	O
procedure	O
,	O
aka	O
constructors	O
.	O
</s>
<s>
See	O
Eiffel	B-Language
paragraph	O
at	O
Constructor	O
(	O
computer	O
science	O
)	O
.	O
</s>
<s>
Implementing	O
{DISPOSABLE}.dispose	O
ensures	O
that	O
dispose	O
will	O
be	O
called	O
when	O
object	O
is	O
garbage	B-General_Concept
collected	I-General_Concept
.	O
</s>
<s>
Objective-C	B-Language
(	O
Cocoa	B-Operating_System
)	O
-	O
(	O
id	O
)	O
init	O
{	O
instructions	O
...	O
return	O
self	O
;	O
}	O
or	O
-	O
(	O
id	O
)	O
initWithFoo:parameter	O
«	O
bar:parameter	O
...	O
»	O
{	O
instructions	O
...	O
return	O
self	O
;	O
}	O
-	O
(	O
void	O
)	O
dealloc	O
{	O
instructions	O
}	O
-	O
(	O
void	O
)	O
finalize	O
{	O
instructions	O
}	O
Swift	B-Application
init( «parameters»	O
)	O
{	O
instructions	O
}	O
deinit	O
{	O
instructions	O
}	O
Python	B-Language
def	O
__init__( self«	O
,	O
parameters»	O
)	O
:	O
instructions	O
def	O
__del__(self )	O
:	O
instructions	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Sub	O
New( «parameters»	O
)	O
instructions	O
End	O
Sub	O
Sub	O
Dispose( )	O
instructions	O
End	O
Sub	O
Overrides	O
Sub	O
Finalize( )	O
instructions	O
End	O
Sub	O
Xojo	B-Application
Sub	O
Constructor( «parameters»	O
)	O
instructions	O
End	O
Sub	O
Sub	O
Destructor( )	O
instructions	O
End	O
Sub	O
PHP	B-Application
function	O
__construct( «parameters»	O
)	O
{	O
instructions	O
}	O
function	O
__destruct( )	O
{	O
instructions	O
}	O
Perl	B-Language
sub	O
new	B-Language
{	O
my	O
( $class«	O
,	O
parameters»	O
)	O
=	O
@_	O
;	O
my	O
$self	O
=	O
{};	O
instructions	O
...	O
bless($self, $class )	O
;	O
return	O
$self	O
;	O
}	O
sub	O
DESTROY	O
{	O
my	O
( $self	O
)	O
=	O
@_	O
;	O
instructions	O
}	O
Raku	B-Application
submethod	O
BUILD	O
{	O
instructions	O
}	O
or	O
«	O
multi	O
»	O
method	O
new( ««$self	O
:	O
»	O
parameters»	O
)	O
{	O
self.bless	O
( *	O
,	O
field1	O
=>	O
value1	O
,	O
...	O
)	O
;	O
...	O
instructions	O
}	O
submethod	O
DESTROY	O
{	O
instructions	O
}	O
Ruby	B-Language
def	O
initialize«( parameters	O
)	O
»	O
instructions	O
end	O
colspan	O
=	O
2	O
Windows	B-Application
PowerShell	I-Application
colspan	O
=3	O
OCaml	B-Language
initializer	O
instructionsThis	O
"	O
initializer	O
"	O
construct	O
is	O
rarely	O
used	O
.	O
</s>
<s>
Fields	O
in	O
OCaml	B-Language
are	O
usually	O
initialized	O
directly	O
in	O
their	O
declaration	O
.	O
</s>
<s>
The	O
"	O
parameters	O
to	O
the	O
constructor	O
"	O
in	O
other	O
languages	O
are	O
instead	O
specified	O
as	O
the	O
parameters	O
to	O
the	O
class	O
in	O
OCaml	B-Language
.	O
</s>
<s>
colspan	O
=	O
2	O
F#	B-Operating_System
do	O
instructions	O
or	O
new(parameters )	O
=	O
expressionThis	O
syntax	O
is	O
usually	O
used	O
to	O
overload	B-Language
constructors	O
member	O
this.Dispose( )	O
=	O
instructions	O
override	O
this.Finalize( )	O
=	O
instructions	O
JavaScript	B-Language
function	O
name( «parameters»	O
)	O
{	O
instructions	O
}	O
In	O
JavaScript	B-Language
,	O
constructor	O
is	O
an	O
object	O
.	O
</s>
<s>
colspan	O
=	O
2	O
JavaScript	B-Language
(	O
ES6	O
)	O
constructor( «parameters»	O
)	O
{	O
instructions	O
}	O
COBOL	B-Application
Constructors	O
can	O
be	O
emulated	O
with	O
a	O
factory	O
method	O
returning	O
a	O
class	O
instance	O
.	O
</s>
<s>
APL	B-Language
(	O
Dyalog	O
)	O
:Field	O
Public	O
field	O
«	O
←	O
value»	O
:Field	O
«	O
Private»	O
field	O
«	O
←	O
value»	O
C++	B-Language
(	O
STL	B-Application
)	O
public	O
:	O
type	O
field	O
;	O
private	O
:	O
type	O
field	O
;	O
protected	O
:	O
type	O
field	O
;	O
In	O
C++	B-Language
,	O
specific	O
fields	O
are	O
not	O
declared	O
as	O
accessible	O
by	O
outside	O
things	O
.	O
</s>
<s>
See	O
friend	B-Language
function	I-Language
and	O
friend	B-Application
class	I-Application
for	O
more	O
details	O
.	O
</s>
<s>
Python	B-Language
self.field	O
=	O
valueJust	O
assign	O
a	O
value	O
to	O
it	O
in	O
a	O
method	O
Python	B-Language
does	O
n't	O
have	O
private	O
fields	O
-	O
all	O
fields	O
are	O
publicly	O
accessible	O
at	O
all	O
times	O
.	O
</s>
<s>
colspan	O
=	O
2	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Public	O
field	O
As	O
type	O
«	O
=	O
value»	O
Private	O
field	O
As	O
type	O
«	O
=	O
value»	O
Protected	O
field	O
As	O
type	O
«	O
=	O
value»	O
Friend	O
field	O
As	O
type	O
«	O
=	O
value»	O
Xojo	B-Application
Public	O
field	O
As	O
type	O
«	O
=	O
value»	O
Private	O
field	O
As	O
type	O
«	O
=	O
value»	O
Protected	O
field	O
As	O
type	O
«	O
=	O
value»	O
PHP	B-Application
public	O
$field	O
«	O
=	O
value»	O
;	O
private	O
$field	O
«	O
=	O
value»	O
;	O
protected	O
$field	O
«	O
=	O
value»	O
;	O
Perl	B-Language
$self->{field}	O
=	O
value	O
;	O
colspan	O
=3	O
Raku	B-Application
has«	O
type	O
»$	O
.field	O
«	O
is	O
rw»	O
has«	O
type	O
»$	O
!	O
field	O
colspan	O
=	O
2	O
Ruby	B-Language
colspan	O
=	O
2	O
@field	O
=	O
value	O
Windows	B-Application
PowerShell	I-Application
Add-Member	O
«	O
-MemberType	O
»	O
NoteProperty	O
«	O
-Name	O
»	O
Bar	O
«	O
-Value	O
»	O
value-InputObject	O
variable	O
colspan	O
=3	O
OCaml	B-Language
colspan	O
=	O
2	O
val	O
«	O
mutable»	O
field	O
=	O
value	O
rowspan	O
=	O
2	O
F#	B-Operating_System
let	O
«	O
mutable»	O
field	O
=	O
value	O
JavaScript	B-Language
this.field	O
=	O
value	O
this["field"]	O
=	O
value	O
COBOL	B-Application
level-number	O
field	O
clauses.All	O
class	O
data	O
is	O
'	O
private	O
 '	O
because	O
the	O
COBOL	B-Application
standard	O
does	O
not	O
specify	O
any	O
way	O
to	O
access	O
it	O
.	O
</s>
<s>
parameter	O
=	O
argument	O
can	O
be	O
repeated	O
if	O
there	O
are	O
several	O
parameters.In	O
ABAP	O
,	O
the	O
return	O
parameter	O
name	O
is	O
explicitly	O
defined	O
in	O
the	O
method	O
signature	O
within	O
the	O
class	O
definition	O
APL	B-Language
(	O
Dyalog	O
)	O
∇	O
«	O
left	O
argument»	O
name	O
«	O
right	O
arguments»instructions∇	O
∇	O
result	O
←	O
«	O
left	O
argument»	O
name	O
«	O
right	O
arguments»instructions∇	O
C++In	O
C++	B-Language
,	O
declaring	O
and	O
implementing	O
methods	O
is	O
usually	O
separate	O
.	O
</s>
<s>
One	O
reason	O
is	O
that	O
the	O
compiler	O
will	O
try	O
to	O
inline	O
methods	O
that	O
are	O
included	O
in	O
the	O
class	O
declaration	O
;	O
so	O
if	O
a	O
very	O
short	O
one-line	B-Language
method	O
occurs	O
,	O
it	O
may	O
make	O
it	O
faster	O
to	O
allow	O
a	O
compiler	O
to	O
inline	O
it	O
,	O
by	O
including	O
the	O
body	O
along	O
with	O
the	O
declaration	O
.	O
</s>
<s>
Also	O
,	O
if	O
a	O
template	B-Application
class	O
or	O
method	O
occurs	O
,	O
then	O
all	O
the	O
code	O
must	O
be	O
included	O
with	O
the	O
declaration	O
,	O
because	O
only	O
with	O
the	O
code	O
can	O
the	O
template	B-Application
be	O
instantiated	O
.	O
</s>
<s>
void	O
foo( «parameters»	O
)	O
{	O
instructions	O
}	O
type	O
foo( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
C#	B-Application
D	B-Application
Java	B-Language
eC	B-Language
void	O
««	O
type	O
of	O
'	O
this'»	O
::	O
»	O
foo( «parameters»	O
)	O
{	O
instructions	O
}	O
type	O
««	O
type	O
of	O
this»	O
::	O
»	O
foo( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
Eiffel	B-Language
foo	O
(	O
«	O
parameters»	O
)	O
do	O
instructions	O
end	O
foo	O
(	O
«	O
parameters»	O
)	O
:	O
TYPE	O
do	O
instructions	O
...	O
</s>
<s>
Result	O
:=	O
value	O
end	O
Objective-C	B-Language
-	O
(	O
void	O
)	O
foo«	O
:parameter	O
«	O
bar:parameter	O
...	O
»»	O
{	O
instructions	O
}	O
-	O
(	O
type	O
)	O
foo«	O
:parameter	O
«	O
bar:parameter	O
...	O
»»	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
Swift	B-Application
func	O
foo( «parameters»	O
)	O
{	O
instructions	O
}	O
func	O
foo( «parameters»	O
)	O
->	O
type	O
{	O
instructions	O
...	O
return	O
value	O
}	O
Python	B-Language
def	O
foo( self«	O
,	O
parameters»	O
)	O
:	O
instructions	O
def	O
foo( self«	O
,	O
parameters»	O
)	O
:	O
instructions	O
return	O
value	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Sub	O
Foo( «parameters»	O
)	O
instructions	O
End	O
Sub	O
Function	O
Foo( «parameters»	O
)	O
As	O
type	O
instructions	O
...	O
Return	O
value	O
End	O
Function	O
Xojo	B-Application
Sub	O
Foo( «parameters»	O
)	O
instructions	O
End	O
Sub	O
Function	O
Foo( «parameters»	O
)	O
As	O
type	O
instructions	O
...	O
Return	O
value	O
End	O
Function	O
PHP	B-Application
function	O
foo( «parameters»	O
)	O
«	O
:	O
void»	O
{	O
instructions	O
}	O
function	O
foo( «parameters»	O
)	O
«	O
:	O
type»	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
Perl	B-Language
sub	O
foo	O
{	O
my	O
( $self«	O
,	O
parameters»	O
)	O
=	O
@_	O
;	O
instructions	O
}	O
sub	O
foo	O
{	O
my	O
( $self«	O
,	O
parameters»	O
)	O
=	O
@_	O
;	O
instructions	O
...	O
return	O
value	O
;	O
}	O
Raku	B-Application
«	O
has	O
»«	O
multi	O
»	O
method	O
foo( ««$self	O
:	O
»	O
parameters»	O
)	O
{	O
instructions	O
}	O
«	O
has	O
«	O
type	O
»»«	O
multi	O
»	O
method	O
foo( ««$self	O
:	O
»	O
parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
Ruby	B-Language
def	O
foo«( parameters	O
)	O
»	O
instructions	O
end	O
def	O
foo«( parameters	O
)	O
»	O
instructions	O
expression	O
resulting	O
in	O
return	O
value	O
end	O
or	O
def	O
foo«( parameters	O
)	O
»	O
instructions	O
return	O
value	O
end	O
Windows	B-Application
PowerShell	I-Application
Add-Member	O
«	O
-MemberType	O
»	O
ScriptMethod	O
«	O
-Name	O
»	O
foo	O
«	O
-Value	O
»	O
{	O
«	O
param(parameters )	O
»	O
instructions	O
}	O
-InputObject	O
variable	O
Add-Member	O
«	O
-MemberType	O
»	O
ScriptMethod	O
«	O
-Name	O
»	O
foo	O
«	O
-Value	O
»	O
{	O
«	O
param(parameters )	O
»	O
instructions	O
...	O
return	O
value	O
}	O
-InputObject	O
variable	O
OCaml	B-Language
rowspan	O
=	O
2	O
method	O
foo	O
«	O
parameters»	O
=	O
expression	O
F#	B-Operating_System
member	O
this.foo	O
( «parameters»	O
)	O
=	O
expression	O
JavaScript	B-Language
this.method	O
=	O
function( «parameters»	O
)	O
 { instructions } 	O
name«	O
.prototype.method	O
=	O
function( «parameters»	O
)	O
{instructions}Just	O
assign	O
a	O
function	O
to	O
it	O
in	O
a	O
method	O
this.method	O
=	O
function( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;}	O
name«	O
.prototype.method	O
=	O
function( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;}	O
Javascript	B-Language
(	O
ES6	O
)	O
foo( «parameters»	O
)	O
{	O
instructions}foo( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value	O
;}	O
COBOL	B-Application
METHOD-ID	O
.	O
</s>
<s>
Cobra	B-Language
def	O
foo(parameters )	O
instructions	O
def	O
foo(parameters )	O
as	O
type	O
instructions	O
return	O
value	O
ISLISP	B-Language
(	O
defgeneric	O
method	O
(	O
arg1	O
arg2	O
)	O
)	O
(	O
defmethod	O
method	O
( ( arg1	O
<class1> arg2 <class2>	O
)	O
...	O
)	O
</s>
<s>
read-write	O
read-only	O
write-only	O
ABAP	O
Objects	O
colspan	O
=3	O
APL	B-Language
(	O
Dyalog	O
)	O
:Property	O
Bar∇	O
result	O
←	O
Getinstructions∇∇	O
Set	O
argumentsinstructions∇	O
:EndProperty	O
Bar	O
:Property	O
Bar∇	O
result	O
←	O
Getinstructions∇	O
:EndProperty	O
Bar	O
:Property	O
Bar∇	O
Set	O
argumentsinstructions∇	O
:EndProperty	O
Bar	O
C++	B-Language
(	O
STL	B-Application
)	O
colspan	O
=3	O
C#	B-Application
type	O
Bar	O
{	O
get	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
set	O
{	O
instructions	O
}	O
}	O
type	O
Bar	O
{	O
get	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
}	O
type	O
Bar	O
{	O
set	O
{	O
instructions	O
}	O
}	O
D	B-Application
@property	O
type	O
bar( )	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
@property	O
type	O
bar(type value )	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
@property	O
type	O
bar( )	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
@property	O
type	O
bar(type value )	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
eC	B-Language
property	O
type	O
Bar	O
{	O
get	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
set	O
{	O
instructions	O
}	O
}	O
property	O
type	O
Bar	O
{	O
get	O
{	O
instructions	O
...	O
return	O
value	O
;	O
}	O
}	O
property	O
type	O
Bar	O
{	O
set	O
{	O
instructions	O
}	O
}	O
Java	B-Language
colspan	O
=3	O
Objective-C	B-Language
2.0	O
(	O
Cocoa	B-Operating_System
)	O
@property	O
(	O
readwrite	O
)	O
type	O
bar	O
;	O
and	O
then	O
inside	O
@implementation	O
-	O
(	O
type	O
)	O
bar	O
{	O
instructions	O
}	O
-	O
(	O
void	O
)	O
setBar:(type )	O
value	O
{	O
instructions	O
}	O
@property	O
(	O
readonly	O
)	O
type	O
bar	O
;	O
and	O
then	O
inside	O
@implementation	O
-	O
(	O
type	O
)	O
bar	O
{	O
instructions	O
}	O
Swift	B-Application
var	O
bar	O
:	O
type	O
{	O
get	O
{	O
instructions	O
}	O
set«( newBar	O
)	O
»	O
{	O
instructions	O
}	O
}	O
var	O
bar	O
:	O
type	O
{	O
instructions	O
}	O
Eiffel	B-Language
feature	O
--	O
Access	O
x	O
:	O
TYPE	O
assign	O
set_x	O
feature	O
--	O
Settings	O
set_x	O
(	O
a_x	O
:	O
like	O
x	O
)	O
do	O
instructions	O
ensure	O
x_set	O
:	O
verification	O
end	O
Python	B-Language
def	O
setBar(self, value )	O
:	O
instructionsdef	O
getBar(self )	O
:	O
instructions	O
return	O
valuebar	O
=	O
property(getBar, setBar )	O
Alternative	O
implementation	O
:	O
</s>
<s>
bar	O
=	O
property( **	O
bar( )	O
)	O
def	O
getBar(self )	O
:	O
instructions	O
return	O
valuebar	O
=	O
property(getBar )	O
def	O
setBar(self, value )	O
:	O
instructionsbar	O
=	O
property( fset	O
=	O
setBar	O
)	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Property	O
Bar( )	O
As	O
typeGetinstructionsReturn	O
valueEnd	O
GetSet	O
(	O
ByVal	O
Value	O
As	O
type	O
)	O
instructionsEnd	O
SetEnd	O
Property	O
ReadOnly	O
Property	O
Bar( )	O
As	O
typeGetinstructionsReturn	O
valueEnd	O
GetEnd	O
Property	O
WriteOnly	O
Property	O
Bar( )	O
As	O
typeSet	O
(	O
ByVal	O
Value	O
As	O
type	O
)	O
instructionsEnd	O
SetEnd	O
Property	O
Xojo	B-Application
ComputedProperty	O
Bar( )	O
As	O
typeGetinstructionsReturn	O
valueEnd	O
GetSet	O
(	O
ByVal	O
Value	O
As	O
type	O
)	O
instructionsEnd	O
SetEnd	O
ComputedProperty	O
ComputedProperty	O
Bar( )	O
As	O
typeGetinstructionsReturn	O
valueEnd	O
GetEnd	O
ComputedProperty	O
ComputedProperty	O
Bar( )	O
As	O
typeSet	O
(	O
value	O
As	O
type	O
)	O
instructionsEnd	O
SetEnd	O
ComputedProperty	O
PHP	B-Application
function	O
__get($property )	O
{	O
switch	O
( $property	O
)	O
{	O
case	O
Bar	O
:	O
instructions	O
...	O
return	O
value	O
;	O
}	O
}	O
function	O
__set($property, $value )	O
{	O
switch	O
( $property	O
)	O
{	O
case	O
Bar	O
:	O
instructions	O
}	O
}	O
function	O
__get($property )	O
{	O
switch	O
( $property	O
)	O
{	O
case	O
Bar	O
:	O
instructions	O
...	O
return	O
value	O
;	O
}	O
}	O
function	O
__set($property, $value )	O
{	O
switch	O
( $property	O
)	O
{	O
case	O
Bar	O
:	O
instructions	O
}	O
}	O
Perl	B-Language
sub	O
Bar	O
{	O
my	O
$self	O
=	O
shift	O
;	O
if	O
(	O
my	O
$Bar	O
=	O
shift	O
)	O
{	O
#	O
setter	O
$self->{Bar}	O
=	O
$Bar	O
;	O
return	O
$self	O
;	O
}	O
else	O
{	O
#	O
getter	O
return	O
$self->{Bar};	O
}}	O
sub	O
Bar	O
{	O
my	O
$self	O
=	O
shift	O
;	O
if	O
(	O
my	O
$Bar	O
=	O
shift	O
)	O
{	O
#	O
read-only	O
die	O
"	O
Bar	O
is	O
read-only	O
\n	O
 "	O
;	O
}	O
else	O
{	O
#	O
getter	O
return	O
$self->{Bar};	O
}}	O
sub	O
Bar	O
{	O
my	O
$self	O
=	O
shift	O
;	O
if	O
(	O
my	O
$Bar	O
=	O
shift	O
)	O
{	O
#	O
setter	O
$self->{Bar}	O
=	O
$Bar	O
;	O
return	O
$self	O
;	O
}	O
else	O
{	O
#	O
write-only	O
die	O
"	O
Bar	O
is	O
write-only	O
\n	O
 "	O
;	O
}}	O
Raku	B-Application
colspan	O
=3	O
Ruby	B-Language
def	O
bar	O
instructions	O
expression	O
resulting	O
in	O
return	O
value	O
end	O
def	O
bar	O
=(	O
value	O
)	O
instructions	O
end	O
def	O
bar	O
instructions	O
expression	O
resulting	O
in	O
return	O
value	O
end	O
def	O
bar	O
=(	O
value	O
)	O
instructions	O
end	O
Windows	B-Application
PowerShell	I-Application
Add-Member	O
«	O
-MemberType	O
»	O
ScriptProperty	O
«	O
-Name	O
»	O
Bar	O
«	O
-Value	O
»{	O
instructions	O
...	O
return	O
value	O
}	O
«	O
-SecondValue	O
»{	O
instructions	O
}	O
-InputObject	O
variable	O
Add-Member	O
«	O
-MemberType	O
»	O
ScriptProperty	O
«	O
-Name	O
»	O
Bar	O
«	O
-Value	O
»{	O
instructions	O
...	O
return	O
value}	O
-InputObject	O
variable	O
Add-Member	O
«	O
-MemberType	O
»	O
ScriptProperty	O
«	O
-Name	O
»	O
Bar	O
-SecondValue	O
{	O
instructions	O
}	O
-InputObject	O
variable	O
OCaml	B-Language
colspan	O
=3	O
F#	B-Operating_System
member	O
this.Bar	O
with	O
get( )	O
=	O
expression	O
and	O
set(value )	O
=	O
expression	O
member	O
this.Bar	O
=	O
expression	O
member	O
this.Bar	O
with	O
set(value )	O
=	O
expressionJavaScript	O
(	O
ES6	O
)	O
get	O
bar( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value}set	O
bar( «parameters»	O
)	O
{	O
instructions	O
}	O
get	O
bar( «parameters»	O
)	O
{	O
instructions	O
...	O
return	O
value}set	O
bar( «parameters»	O
)	O
{	O
instructions	O
}	O
COBOL	B-Application
METHOD-ID	O
.	O
</s>
<s>
read-write	O
read-only	O
write-only	O
ABAP	O
Objects	O
colspan	O
=3	O
C++	B-Language
(	O
STL	B-Application
)	O
colspan	O
=3	O
C#	B-Application
type	O
Bar	O
{	O
get	O
;	O
set	O
;	O
}	O
type	O
Bar	O
{	O
get	O
;	O
private	O
set	O
;	O
}	O
type	O
Bar	O
{	O
private	O
get	O
;	O
set	O
;	O
}	O
D	B-Application
colspan	O
=3	O
Java	B-Language
colspan	O
=3	O
Objective-C	B-Language
2.0	O
(	O
Cocoa	B-Operating_System
)	O
@property	O
(	O
readwrite	O
)	O
type	O
bar	O
;	O
and	O
then	O
inside	O
@implementation	O
@synthesize	O
bar	O
;	O
@property	O
(	O
readonly	O
)	O
type	O
bar	O
;	O
and	O
then	O
inside	O
@implementation	O
@synthesize	O
bar	O
;	O
Swift	B-Application
var	O
bar	O
:	O
type	O
let	O
bar	O
:	O
type	O
Eiffel	B-Language
Python	B-Language
@propertydef	O
bar(self )	O
:instructions	O
@bar	O
.setterdef	O
bar(self, value )	O
:instructions	O
@propertydef	O
bar(self )	O
:instructions	O
bar	O
=	O
property( )	O
@bar	O
.setterdef	O
bar(self, value )	O
:instructions	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Property	O
Bar	O
As	O
type«	O
=	O
initial_value»	O
(	O
VB	O
10	O
)	O
PHP	B-Application
Perlthese	O
examples	O
need	O
the	O
Class::Accessor	O
module	O
installed	O
use	O
base	O
qw( 	O
Class::Accessor	O
)	O
;	O
__PACKAGE__->mk_accessors('Bar' )	O
;	O
use	O
base	O
qw( 	O
Class::Accessor	O
)	O
;	O
__PACKAGE__->mk_ro_accessors('Bar' )	O
;	O
use	O
base	O
qw( 	O
Class::Accessor	O
)	O
;	O
__PACKAGE__->mk_wo_accessors('Bar' )	O
;	O
Raku	B-Application
colspan	O
=3	O
Ruby	B-Language
attr_accessor	O
:bar	O
attr_reader	O
:bar	O
attr_writer	O
:bar	O
Windows	B-Application
PowerShell	I-Application
OCaml	B-Language
colspan	O
=3	O
F#	B-Operating_System
member	O
val	O
Bar	O
=	O
value	O
with	O
get	O
,	O
set	O
COBOL	B-Application
level-number	O
bar	O
clauses	O
PROPERTY	O
.	O
</s>
<s>
unary	O
binary	O
function	O
call	O
ABAP	O
Objects	O
colspan	O
=3	O
C++	B-Language
(	O
STL	B-Application
)	O
type	O
operator	O
symbol	O
(	O
)	O
{	O
instructions	O
}	O
type	O
operator	O
symbol	O
(	O
type	O
operand2	O
)	O
{	O
instructions	O
}	O
type	O
operator	O
(	O
)	O
( «	O
parameters»	O
)	O
{	O
instructions	O
}	O
C#	B-Application
static	O
type	O
operator	O
symbol(type operand )	O
{	O
instructions	O
}	O
static	O
type	O
operator	O
symbol(type operand1, type operand2 )	O
{	O
instructions	O
}	O
D	B-Application
type	O
opUnary(string s )	O
(	O
)	O
if	O
(	O
s	O
==	O
"	O
symbol	O
"	O
)	O
{	O
instructions	O
}	O
type	O
opBinary(string s )	O
(	O
type	O
operand2	O
)	O
if	O
(	O
s	O
==	O
"	O
symbol	O
"	O
)	O
{	O
instructions	O
}	O
type	O
opBinaryRight(string s )	O
(	O
type	O
operand1	O
)	O
if	O
(	O
s	O
==	O
"	O
symbol	O
"	O
)	O
switch	O
(	O
s	O
)	O
{	O
instructions	O
}	O
type	O
opCall( «parameters»	O
)	O
{	O
instructions	O
}	O
Java	B-Language
rowspan	O
=	O
2	O
colspan	O
=3	O
Objective-C	B-Language
Swift	B-Application
func	O
symbol( operand1	O
:	O
type	O
)	O
->	O
returntype	O
{	O
instructions	O
}	O
(	O
outside	O
class	O
)	O
func	O
symbol( operand1	O
:	O
type1	O
,	O
operand2	O
:	O
type2	O
)	O
->	O
returntype	O
{	O
instructions	O
}	O
(	O
outside	O
class	O
)	O
EiffelAlthough	O
Eiffel	B-Language
does	O
not	O
support	O
overloading	O
of	O
operators	O
,	O
it	O
can	O
define	O
operators	O
op_name	O
alias	O
"	O
symbol	O
"	O
:	O
TYPE	O
do	O
instructions	O
end	O
op_name	O
alias	O
"	O
symbol	O
"	O
(	O
operand	O
:	O
TYPE1	O
)	O
:	O
TYPE2	O
do	O
instructions	O
end	O
Python	B-Language
def	O
__opname__(self )	O
:	O
instructions	O
return	O
value	O
def	O
__opname__(self, operand2 )	O
:	O
instructions	O
return	O
value	O
def	O
__call__( self«	O
,	O
parameters»	O
)	O
:	O
instructions	O
return	O
value	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Shared	O
Operator	O
symbol(operand As type )	O
As	O
type	O
instructions	O
End	O
Operator	O
Shared	O
Operator	O
symbol(operand1 As type, operand2 As type )	O
As	O
type	O
instructions	O
End	O
Operator	O
Xojo	B-Application
Function	O
Operator_name(operand As type )	O
As	O
type	O
instructions	O
End	O
Function	O
colspan	O
=	O
2	O
PHPPHP	O
does	O
not	O
support	O
operator	O
overloading	O
natively	O
,	O
but	O
support	O
can	O
be	O
added	O
using	O
the	O
"	O
operator	O
"	O
PECL	O
package	O
.	O
</s>
<s>
read-write	O
read-only	O
write-only	O
ABAP	O
Objects	O
colspan	O
=3	O
APL	B-Language
(	O
Dyalog	O
)	O
:Property	O
Numbered	O
Default	O
name∇	O
result	O
←	O
Getinstructions∇∇	O
Set	O
argumentsinstructions∇	O
:EndProperty	O
Bar	O
:Property	O
Numbered	O
Default	O
Bar∇	O
result	O
←	O
Getinstructions∇	O
:EndProperty	O
Bar	O
:Property	O
Numbered	O
Default	O
Bar∇	O
Set	O
argumentsinstructions∇	O
:EndProperty	O
Bar	O
C++	B-Language
(	O
STL	B-Application
)	O
type&	O
operator[]( type	O
index	O
)	O
{	O
instructions	O
}	O
type	O
operator[]( type	O
index	O
)	O
{	O
instructions	O
}	O
C#	B-Application
type	O
this[ type	O
index ]	O
{	O
get{	O
instructions	O
}	O
set{	O
instructions	O
}	O
}	O
type	O
this[ type	O
index ]	O
{	O
get{	O
instructions	O
}	O
}	O
type	O
this[ type	O
index ]	O
{	O
set{	O
instructions	O
}	O
}	O
D	B-Application
type	O
opIndex(type index )	O
{	O
instructions	O
}	O
type	O
opIndexAssign(type value, type index )	O
{	O
instructions	O
}	O
type	O
opIndex(type index )	O
{	O
instructions	O
}	O
type	O
opIndexAssign(type value, type index )	O
{	O
instructions	O
}	O
Java	B-Language
colspan	O
=3	O
Objective-C	B-Language
(	O
recent	O
Clang	O
compiler	O
)	O
-	O
(	O
id	O
)	O
objectAtIndexedSubscript:(NSUInteger )	O
index	O
{	O
instructions	O
return	O
value	O
;	O
}	O
or	O
-	O
(	O
id	O
)	O
objectForKeyedSubscript:(id )	O
index	O
{	O
instructions	O
return	O
value	O
;	O
}	O
-	O
(	O
void	O
)	O
setObject:(id )	O
value	O
atIndexedSubscript:(NSUInteger )	O
index	O
{	O
instructions	O
}	O
or	O
-	O
(	O
void	O
)	O
setObject:(id )	O
value	O
forKeyedSubscript:(id )	O
index	O
{	O
instructions	O
}	O
Swift	B-Application
subscript	O
(	O
index	O
:	O
type	O
)	O
->	O
returntype	O
{	O
get	O
{	O
instructions	O
}	O
set«( newIndex	O
)	O
»	O
{	O
instructions	O
}	O
}	O
subscript	O
(	O
index	O
:	O
type	O
)	O
->	O
returntype	O
{	O
instructions	O
}	O
Eiffel	B-Language
bracket_name	O
alias	O
"[]"	O
(	O
index	O
:	O
TYPE	O
)	O
:	O
TYPE	O
assign	O
set_item	O
do	O
instructions	O
end	O
set_item	O
(	O
value	O
:	O
TYPE	O
;	O
index	O
:	O
TYPE	O
)	O
:	O
do	O
instructions	O
end	O
bracket_name	O
alias	O
"[]"	O
(	O
index	O
:	O
TYPE	O
)	O
:	O
TYPE	O
do	O
instructions	O
end	O
Python	B-Language
def	O
__getitem__(self, index )	O
:	O
instructions	O
return	O
value	O
def	O
__setitem__(self, index, value )	O
:	O
instructions	O
def	O
__getitem__(self, index )	O
:	O
instructions	O
return	O
value	O
def	O
__setitem__(self, index, value )	O
:	O
instructions	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Default	O
Property	O
Item(Index As type )	O
As	O
type	O
Get	O
instructions	O
End	O
Get	O
Set(ByVal Value As type )	O
instructions	O
End	O
Set	O
End	O
Property	O
Default	O
ReadOnly	O
Property	O
Item(Index As type )	O
As	O
type	O
Get	O
instructions	O
End	O
Get	O
End	O
Property	O
Default	O
WriteOnly	O
Property	O
Item(Index As type )	O
As	O
type	O
Set(ByVal Value As type )	O
instructions	O
End	O
Set	O
End	O
Property	O
PHPThe	O
class	O
must	O
implement	O
the	O
ArrayAccess	O
interface	O
.	O
</s>
<s>
Handler	O
for	O
missing	O
member	O
Method	O
Field	O
Method	O
Field	O
APL	B-Language
(	O
Dyalog	O
)	O
3	O
=	O
x.	O
⎕NC'method'	O
2	O
=	O
x.	O
⎕NC'method'	O
colspan	O
=	O
2	O
ABAP	O
Objects	O
rowspan	O
=	O
2	O
colspan	O
=	O
4	O
C++	B-Language
(	O
STL	B-Application
)	O
Objective-C	B-Language
(	O
Cocoa	B-Operating_System
)	O
[	O
x	O
respondsToSelector	O
:	O
@selector(method )	O
]	O
forwardInvocation	O
:	O
Smalltalk	B-Application
x	O
respondsTo	O
:	O
selector	O
doesNotUnderstand	O
:	O
C#	B-Application
(	O
using	O
reflection	O
)	O
eC	B-Language
Java	B-Language
D	B-Application
opDispatch( )	O
Eiffel	B-Language
colspan	O
=	O
4	O
Python	B-Language
hasattr(x, "method" )	O
and	O
callable( 	O
x.method	O
)	O
hasattr(x, "field" )	O
__getattr__( )	O
Visual	O
Basic	O
.NET(using reflection )	O
Xojo(using Introspection )	O
Windows	O
PowerShell(using reflection )	O
F#( using	O
reflection	O
)	O
Ruby	B-Language
x.respond_to	O
?	O
</s>
<s>
current	B-Application
object	I-Application
current	B-Application
object	I-Application
's	O
parent	O
object	O
null	O
reference	O
Current	B-Operating_System
Context	I-Operating_System
of	I-Operating_System
Execution	I-Operating_System
Smalltalk	B-Application
self	O
super	O
nil	O
thisContext	O
ABAP	O
Objects	O
me	O
super	O
initial	O
APL	B-Language
(	O
Dyalog	O
)	O
⎕THIS	O
⎕BASE	O
⎕NULL	O
C++	B-Language
(	O
STL	B-Application
)	O
*	O
thisC++	O
does	O
n't	O
have	O
a	O
"	O
super	O
"	O
keyword	O
,	O
because	O
multiple	B-Application
inheritance	I-Application
is	O
possible	O
,	O
and	O
so	O
it	O
may	O
be	O
ambiguous	O
which	O
base	O
class	O
is	O
referenced	O
.	O
</s>
<s>
Microsoft	O
Visual	O
C++	B-Language
provides	O
a	O
non-standard	O
keyword	O
"	O
__super	O
"	O
for	O
this	O
purpose	O
;	O
but	O
this	O
is	O
unsupported	O
in	O
other	O
compilers	O
.	O
</s>
<s>
NULL	O
,	O
nullptr	O
C#	B-Application
this	O
baseThe	O
keyword	O
here	O
is	O
not	O
a	O
value	O
,	O
and	O
it	O
can	O
only	O
be	O
used	O
to	O
access	O
a	O
method	O
of	O
the	O
superclass	O
.	O
</s>
<s>
null	O
Java	B-Language
super	O
D	B-Application
JavaScript	B-Language
super	O
(	O
ECMAScript	O
6	O
)	O
null	O
,	O
undefinedBut	O
be	O
afraid	O
,	O
they	O
have	O
not	O
the	O
same	O
value	O
.	O
</s>
<s>
eC	B-Language
this	O
null	O
Objective-C	B-Language
self	O
super	O
nil	O
Swift	B-Application
self	O
super	O
nilonly	O
for	O
Optional	O
types	O
Python	B-Language
selfIn	O
this	O
language	O
,	O
instance	O
methods	O
are	O
passed	O
the	O
current	B-Application
object	I-Application
as	O
the	O
first	O
parameter	O
,	O
which	O
is	O
conventionally	O
named	O
"	O
self	O
"	O
,	O
but	O
this	O
is	O
not	O
required	O
to	O
be	O
the	O
case	O
.	O
</s>
<s>
super(current_class_name, self )	O
super( )	O
(	O
3.x	O
only	O
)	O
None	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
Me	O
MyBase	O
Nothing	O
Xojo	B-Application
Me	O
/	O
Self	O
Parent	O
Nil	O
Eiffel	B-Language
Current	O
Precursor	O
«{superclass}»	O
«( 	O
args	O
)	O
»	O
"	O
Precursor	O
"	O
in	O
Eiffel	B-Language
is	O
actually	O
a	O
call	O
to	O
the	O
method	O
of	O
the	O
same	O
name	O
in	O
the	O
superclass	O
.	O
</s>
<s>
So	O
Precursor(args )	O
is	O
equivalent	O
to	O
"	O
super.currentMethodName(args )	O
"	O
in	O
Java	B-Language
.	O
</s>
<s>
Void	O
PHP	B-Application
$this	O
parent	O
null	O
Perl	B-Language
$self	O
$	O
self->SUPER	O
undef	O
Raku	B-Application
self	O
SUPER	O
Nil	O
Ruby	B-Language
self	O
super«( args	O
)	O
»	O
"	O
super	O
"	O
in	O
Ruby	B-Language
,	O
unlike	O
in	O
other	O
languages	O
,	O
is	O
actually	O
a	O
call	O
to	O
the	O
method	O
of	O
the	O
same	O
name	O
in	O
the	O
superclass	O
.	O
</s>
<s>
So	O
super(args )	O
in	O
Ruby	B-Language
is	O
equivalent	O
to	O
"	O
super.currentMethodName(args )	O
"	O
in	O
Java	B-Language
.	O
</s>
<s>
nil	O
binding	O
Windows	B-Application
PowerShell	I-Application
$this	O
$NULL	O
OCaml	B-Language
selfIn	O
OCaml	B-Language
,	O
an	O
object	O
declaration	O
can	O
optionally	O
start	O
with	O
a	O
parameter	O
which	O
will	O
be	O
associated	O
with	O
the	O
current	B-Application
object	I-Application
.	O
</s>
<s>
superIn	O
OCaml	B-Language
,	O
an	O
inheritance	O
declaration	O
(	O
"	O
inherit	O
"	O
)	O
can	O
optionally	O
be	O
associated	O
with	O
a	O
value	O
,	O
with	O
the	O
syntax	O
"	O
inherit	O
parent_class	O
«	O
parameters»	O
as	O
super	O
"	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
ability	O
to	O
have	O
an	O
"	O
optional	O
"	O
value	O
in	O
OCaml	B-Language
is	O
needed	O
,	O
then	O
wrap	O
the	O
value	O
inside	O
an	O
option	O
type	O
,	O
which	O
values	O
are	O
None	O
and	O
Some	O
x	O
,	O
which	O
could	O
be	O
used	O
to	O
represent	O
"	O
null	O
reference	O
"	O
and	O
"	O
non-null	O
reference	O
to	O
an	O
object	O
"	O
as	O
in	O
other	O
languages	O
.	O
</s>
<s>
String	O
representation	O
Object	O
copy	O
Value	O
equality	O
Object	O
comparison	O
Hash	O
code	O
Object	O
ID	O
Human-readable	O
Source-compatible	O
ABAP	O
Objects	O
colspan	O
=	O
7	O
APL	B-Language
(	O
Dyalog	O
)	O
⍕x	O
⎕SRC	O
x	O
⎕NS	O
x	O
x	O
=	O
y	O
colspan	O
=	O
2	O
C++	B-Language
(	O
STL	B-Application
)	O
x	O
==	O
yassuming	O
that	O
"	O
x	O
"	O
and	O
"	O
y	O
"	O
are	O
the	O
objects	O
(	O
and	O
not	O
a	O
pointer	O
)	O
.	O
</s>
<s>
Can	O
be	O
customized	O
by	O
overloading	O
the	O
object	O
's	O
==	O
operator	O
pointer	O
to	O
object	O
can	O
be	O
converted	O
into	O
an	O
integer	O
ID	O
C#	B-Application
x.ToString( )	O
x.Clone( )	O
x.Equals(y )	O
x.CompareTo(y )	O
x.GetHashCode( )	O
System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(x )	O
Java	B-Language
x.toString( )	O
x.clone( )	O
Only	O
accessible	O
from	O
within	O
the	O
class	O
,	O
since	O
the	O
clone( )	O
method	O
inherited	O
from	O
Object	O
is	O
protected	O
,	O
unless	O
the	O
class	O
overrides	O
the	O
method	O
and	O
makes	O
it	O
public	O
.	O
</s>
<s>
If	O
using	O
the	O
clone( )	O
inherited	O
from	O
Object	O
,	O
the	O
class	O
must	O
implement	O
the	O
Cloneable	O
interface	O
to	O
allow	O
cloning	O
.	O
</s>
<s>
x.hashCode( )	O
System.identityHashCode(x )	O
JavaScript	B-Language
x.toString( )	O
D	B-Application
x.toString( )	O
or	O
std.conv.to!string( x	O
)	O
x.stringof	O
x	O
==	O
y	O
or	O
x.opEquals(y )	O
x.opCmp(y )	O
x.toHash( )	O
eC	B-Language
x.OnGetString(tempString, null, null )	O
or	O
PrintString(x )	O
y.OnCopy(x )	O
x.OnCompare(y )	O
object	O
handle	O
can	O
be	O
converted	O
into	O
an	O
integer	O
ID	O
Objective-C	B-Language
(	O
Cocoa	B-Operating_System
)	O
x.description	O
x.debugDescription	O
[	O
x	O
copy ]Implemented	O
by	O
the	O
object	O
's	O
copyWithZone	O
:	O
method	O
[	O
x	O
isEqual:y	O
]	O
[	O
x	O
compare:y	O
 ]compare	O
:	O
is	O
the	O
conventional	O
name	O
for	O
the	O
comparison	O
method	O
in	O
Foundation	O
classes	O
.	O
</s>
<s>
However	O
,	O
no	O
formal	O
protocol	B-Application
exists	O
x.hash	O
pointer	O
to	O
object	O
can	O
be	O
converted	O
into	O
an	O
integer	O
ID	O
Swift	B-Application
x.descriptionOnly	O
if	O
object	O
conforms	O
to	O
the	O
Printable	O
protocol	B-Application
x.debugDescriptionOnly	O
if	O
object	O
conforms	O
to	O
the	O
DebugPrintable	O
protocol	B-Application
x	O
==	O
yOnly	O
if	O
object	O
conforms	O
to	O
the	O
Equatable	O
protocol	B-Application
x	O
<	O
yOnly	O
if	O
object	O
conforms	O
to	O
the	O
Comparable	O
protocol	B-Application
x.hashValueOnly	O
if	O
object	O
conforms	O
to	O
the	O
hashValue	O
protocol	B-Application
reflect(x )	O
.objectIdentifier	O
!.	O
uintValue( )	O
Smalltalk	B-Application
x	O
displayString	O
x	O
printString	O
x	O
copy	O
x	O
=	O
y	O
x	O
hash	O
x	O
identityHash	O
Python	B-Language
str(x )	O
Can	O
be	O
customized	O
by	O
the	O
object	O
's	O
__str__( )	O
method	O
repr(x )	O
Can	O
be	O
customized	O
by	O
the	O
object	O
's	O
__repr__( )	O
method	O
copy.copy(x )	O
Can	O
be	O
customized	O
by	O
the	O
object	O
's	O
__copy__( )	O
method	O
x	O
==	O
yCan	O
be	O
customized	O
by	O
the	O
object	O
's	O
__eq__( )	O
method	O
cmp(x, y )	O
Only	O
in	O
Python	B-Language
2.x	O
and	O
before	O
(	O
removed	O
in	O
Python	B-Language
3.0	O
)	O
.	O
</s>
<s>
Not	O
all	O
types	O
are	O
hashable	O
(	O
mutable	O
types	O
are	O
usually	O
not	O
hashable	O
)	O
id(x )	O
Visual	B-Language
Basic	I-Language
.NET	I-Language
x.ToString( )	O
x.Clone( )	O
x.Equals(y )	O
x.CompareTo(y )	O
x.GetHashCode( )	O
Eiffel	B-Language
x.out	O
x.twin	O
x.is_equal(y )	O
When	O
x	O
is	O
COMPARABLE	O
,	O
one	O
can	O
simply	O
do	O
x	O
<	O
y	O
When	O
x	O
is	O
HASHABLE	O
,	O
one	O
can	O
use	O
x.hash_code	O
When	O
x	O
is	O
IDENTIFIED	O
,	O
one	O
can	O
use	O
x.object_id	O
PHP	B-Application
$x->__toString( )	O
clone	B-Language
xCan	O
be	O
customized	O
by	O
the	O
object	O
's	O
__clone( )	O
method	O
x	O
==	O
y	O
spl_object_hash(x )	O
Perl	B-Language
"	O
$x	O
"	O
Can	O
be	O
customized	O
by	O
overloading	O
the	O
object	O
's	O
string	O
conversion	O
operator	O
Data::Dumper->Dump	O
( [$x]	O
,	O
[	O
x ]	O
)	O
This	O
example	O
requires	O
useing	O
Data::Dumper	O
Storable::dclone($x )	O
This	O
example	O
requires	O
useing	O
Storable	O
Scalar::Util::refaddr( $x )	O
This	O
example	O
requires	O
useing	O
Scalar::Util	O
Raku	B-Application
~	O
x	O
x.perl	O
x.clone	O
x	O
eqv	O
y	O
x	O
cmp	O
y	O
x.WHICH	O
Ruby	B-Language
x.to_s	O
x.inspect	O
x.dup	O
or	O
x.clone	O
x	O
==	O
y	O
or	O
x.eql	O
?	O
</s>
<s>
Get	O
object	O
type	O
Is	O
instance	O
of	O
(	O
includes	O
subtypes	O
)	O
Upcasting	O
Downcasting	B-Application
Runtime	O
check	O
No	O
check	O
ABAP	O
Objects	O
colspan	O
=	O
2	O
Run-time	O
type	O
information	O
in	O
ABAP	O
can	O
be	O
gathered	O
by	O
using	O
different	O
description	O
Classes	O
like	O
CL_ABAP_CLASSDESCR	O
.	O
</s>
<s>
=	O
?	O
=	O
C++	B-Language
(	O
STL	B-Application
)	O
typeid(x )	O
dynamic_castxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1( &x	O
)	O
!=	O
nullptr	O
rowspan	O
=	O
8	O
Upcasting	O
is	O
implicit	O
in	O
this	O
language	O
.	O
</s>
<s>
dynamic_castxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1( ptr	O
)	O
C#	B-Application
x.GetType( )	O
x	O
is	O
type	O
(	O
type	O
)	O
x	O
or	O
x	O
as	O
type	O
D	B-Application
typeid(x )	O
cast(type )	O
x	O
Delphi	B-Language
x	O
is	O
type	O
x	O
as	O
type	O
eC	B-Language
x._class	O
eClass_IsDerived( 	O
x._class	O
,	O
type	O
)	O
(	O
type	O
)	O
x	O
Java	B-Language
x.getClass( )	O
x	O
instanceof	O
class	O
(	O
type	O
)	O
x	O
Objective-C	B-Language
(	O
Cocoa	B-Operating_System
)	O
[	O
x	O
class ]Only	O
for	O
non-class	O
objects	O
.	O
</s>
<s>
[	O
x	O
isKindOfClass	O
:	O
[	O
class	O
class ] ]	O
(	O
type*	O
)	O
x	O
Swift	B-Application
x.dynamicType	O
x	O
is	O
type	O
x	O
as	O
!	O
</s>
<s>
type	O
JavaScript	B-Language
x.constructor	O
(	O
If	O
not	O
rewritten	O
.	O
)	O
</s>
<s>
Visual	B-Language
Basic	I-Language
.NET	I-Language
x.GetType( )	O
TypeOf	O
x	O
Is	O
type	O
CType(x, type )	O
or	O
TryCast(x, type )	O
Xojo	B-Application
Introspection.GetType(x )	O
x	O
IsA	O
type	O
CType(x, type )	O
Eiffel	B-Language
x.generating_type	O
attached	O
 { TYPE } 	O
x	O
attached	O
 { TYPE } 	O
x	O
as	O
down_x	O
Python	B-Language
type(x )	O
isinstance(x, type )	O
colspan	O
=3	O
rowspan	O
=3	O
PHP	B-Application
get_class(x )	O
x	O
instanceof	O
class	O
Perl	B-Language
ref(x )	O
x->isa("class" )	O
Raku	B-Application
x.WHAT	O
x.isa(class )	O
type(x )	O
or	O
x.type	O
Ruby	B-Language
x.class	O
x.instance_of	O
?	O
</s>
<s>
(	O
type	O
)	O
colspan	O
=3	O
rowspan	O
=	O
2	O
Smalltalk	B-Application
x	O
class	O
x	O
isKindOf	O
:	O
class	O
Windows	B-Application
PowerShell	I-Application
x.GetType( )	O
x	O
-is	O
 [ type ] 	O
[type]x	O
or	O
x	O
-as	O
 [ type ] 	O
OCaml	B-Language
colspan	O
=	O
2	O
This	O
language	O
does	O
n't	O
give	O
run-time	O
type	O
information	O
.	O
</s>
<s>
It	O
is	O
unneeded	O
because	O
it	O
is	O
statically	O
typed	O
and	O
downcasting	B-Application
is	O
impossible	O
.	O
</s>
<s>
(	O
x	O
:>	O
type	O
)	O
colspan	O
=	O
2	O
F#	B-Operating_System
x.GetType( )	O
x	O
:	O
?	O
</s>
<s>
Import	O
namespace	O
Import	O
item	O
qualified	O
unqualified	O
ABAP	O
Objects	O
C++	B-Language
(	O
STL	B-Application
)	O
using	O
namespace	O
ns	O
;	O
using	O
ns::item	O
;	O
C#	B-Application
using	O
ns	O
;	O
using	O
item	O
=	O
ns.item	O
;	O
D	B-Application
import	O
ns	O
;	O
import	O
ns	O
:	O
item	O
;	O
Java	B-Language
import	O
ns	O
.	O
</s>
