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:

    We live in a highly industrialized society and every member of the Black nation must be as academically and technologically developed as possible. To wage a revolution, we need competent teachers, doctors, nurses, electronics experts, chemists, biologists, physicists, political scientists, and so on and so forth. Black women sitting at home reading bedtime stories to their children are just not going to make it.
    Frances Beale, African American feminist and civil rights activist. The Black Woman, ch. 14 (1970)

    In the greatest confusion there is still an open channel to the soul. It may be difficult to find because by midlife it is overgrown, and some of the wildest thickets that surround it grow out of what we describe as our education. But the channel is always there, and it is our business to keep it open, to have access to the deepest part of ourselves.
    Saul Bellow (b. 1915)