Questions tagged [properties]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer

What's the benefit of using different tokens for accessing nested namespaces/modules versus properties?

In JavaScript, accessing items from a module is done using ., e.g. moduleBar.moduleFoo.functionFoo, which looks exactly the same ...
Lazar Ljubenović's user avatar
4 votes
2 answers

Were there attempts to support triggering accessors on modifying subelements of properties?

Some languages offer the feature of properties, different from normal member variables, that trigger some code when you read from or write to the property. The triggered code are called accessors. The ...
user23013's user avatar
  • 2,258
4 votes
2 answers

What are the advantages of supporting computed properties? [duplicate]

In Java or C++, there are no computed properties. Either there is a simple property that can be accessed or set with no strings attached, or a getter/setter method, that can do anything alongside ...
user16217248's user avatar
  • 7,535
8 votes
3 answers

What are the benefits of providing syntax to bind an attribute to a function?

Some languages support binding a function call to an attribute. Python, for example, supports this via property ...
Henry Ecker's user avatar