Member Access
How to access members of an object x
object member | class member | namespace member | |||
---|---|---|---|---|---|
method | field | property | |||
ABAP Objects | x->method(«parameters»). | x->field | x=>field or x=>method(«parameters»). | ||
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:
“Luckless is the country in which the symbols of procreation are the objects of shame, while the agents of destruction are honored! And yet you call that member your pudendum, or shameful part, as if there were anything more glorious than creating life, or anything more atrocious than taking it away.”
—Savinien Cyrano De Bergerac (16191655)
“The last publicized center of American writing was Manhattan. Its writers became known as the New York Intellectuals. With important connections to publishing, and universities, with access to the major book reviews, they were able to pose as the vanguard of American culture when they were so obsessed with the two JoesMcCarthy and Stalinthat they were to produce only two artists, Saul Bellow and Philip Roth, who left town.”
—Ishmael Reed (b. 1938)