Comparison of Programming Languages (object-oriented Programming) - Member Access

Member Access

How to access members of an object x

object member class member namespace member
method field property
ABAP Objects x->methodparameters»). x->field x=>field or x=>methodparameters»).
C++ (STL) x.method(parameters) or
ptr->method(parameters)
x.field or
ptr->field
cls::member ns::member
Objective-C x->field x.property (2.0 only) or
Smalltalk x method«:parameter «bar:parameter ...»» cls method«:parameter «bar:parameter ...»»
C# x.method(parameters) x.field x.property cls.member ns.member
Java
D x.property
Python
Visual Basic .NET
Windows PowerShell ::member
F# cls.member
Eiffel x.method«(parameters)» x.field {cls}.member
Ruby x.property cls.member
PHP x->method(parameters) x->field x->property cls::member ns\member
Perl x->method«(parameters)» x->{field} cls->method«(parameters)» ns::member
Perl 6 x.method«(parameters)» or
x!method«(parameters)»
x.field or
x!field
cls.method«(parameters)» or
cls!method«(parameters)»
ns::member
OCaml x#method «parameters»
JavaScript x.method(parameters)
x(parameters)
x.field
x
x.property
x

Read more about this topic:  Comparison Of Programming Languages (object-oriented Programming)

Famous quotes containing the words member and/or access:

    For love ... has two faces; one white, the other black; two bodies; one smooth, the other hairy. It has two hands, two feet, two tails, two, indeed, of every member and each one is the exact opposite of the other. Yet, so strictly are they joined together that you cannot separate them.
    Virginia Woolf (1882–1941)

    Knowledge in the form of an informational commodity indispensable to productive power is already, and will continue to be, a major—perhaps the major—stake in the worldwide competition for power. It is conceivable that the nation-states will one day fight for control of information, just as they battled in the past for control over territory, and afterwards for control over access to and exploitation of raw materials and cheap labor.
    Jean François Lyotard (b. 1924)