Talk:Property (programming)

From Wikipedia, the free encyclopedia

I'm reluctant to make a really radical change - yet I can't really see the point to the "See also" section when there are links in the first pp. - Jon Shemitz 10:33, 11 September 2006 (UTC)

[edit] Python example code issues

The python example doesn't cause an exception as claimed: >>> pen.readonly = "Something Else" # this fails (raises an exception) >>> pen.readonly 'Something Else' >>>

Also it would be nice to be able to copy and paste the python directly into a python shell. Currently there are indentation errors if a direct copy-paste is done.

Thanks.

Thanks for testing it out, I have fixed both. -- 58.187.94.8 (talk) 07:21, 22 December 2007 (UTC)

[edit] Language Support of Properties

The article states

"Some object-oriented languages, such as C++ and Java, don't support properties, and require the programmer to define a pair of accessor and mutator methods instead."

I won't speak to C++, but Java has had a persistent properties API available since it's release.

java.util.Properties has been available since 1.0.

java.util.Properties is a class for storing configuration about a Java application, see .properties. From this article: "In some object-oriented programming languages, a property is a special sort of class member, intermediate between a field (or data member) and a method. You read and write a property just as you read and write a field, but this is (usually) translated to get and set method calls." -- nothing to do with configuration. 217.205.94.62 10:50, 12 September 2007 (UTC)