On Sep 8, 2009, at 11:32 PM, Lars Torben Wilson wrote:
Lars Torben Wilson wrote:
Lars Torben Wilson wrote:
Daniel Convissor wrote:
Hi Lars:
In an earlier draft I had words to this effect, but it just got
to be unwieldy, since it felt like if I explained that some
people call class variables "properties", I should explain that
others call them "members" or "member variables" or
"attributes" or what-have-you. I'll work on it more. :)
When re-writing the Overloading section, it seemed "members" was
the predominant word used already in the docs. It will be good
to use a clear and consistent term througout the documentation.
Considering the existing usage and the fact that "variables"
already has a separate meaning for something else, I hope you'll
consider using the word "members" here instead of "variables."
Then explain that there are many other things people call them
(and that they particularly hate being called "late for dinner").
Thanks,
--Dan
:)
Yes, this was along the lines of what I was planning to do. I
haven't done a statistical analysis, but (as you noted) it seems
to me that the preference already in the docs is to use 'member'
as opposed to, say, 'property' or 'attribute'. I'll dig into some
changes when I get home from work.
Cheers,
Torben
OK, I know I'm following up my own post, but I just wanted to put
this out there: on the drive home, I realized what was bugging me
about the use of the term "member" in this context: in typical OOP
terminology, a method is also a member, as is a class constant. So
while using the term "member" here might make things more
consistent with some existing PHP documentation, my feeling is that
the docs would overall be better served by fixing the existing
usages to be more in line with common OOP terminology.
Personally I like "property" (as opposed to, say, "attribute" or
"field") but it's not a super-strong preference. However, while
"variable" certainly isn't anything to carry forward, I don't feel
comfortable using "member" either. Sorry about that--it just
offends my sense of pedantry. ;)
Anybody have any thoughts on this? I have no problem with updating
the rest of the oop5 docs to match, no matter the outcome of our
discussion.
Regards,
Torben
And, just to follow up to myself *again* (sigh, I know, I know),
"property" would fit much better with the existing Zend engine
internal naming structure, as well as match existing function names
such as property_exists() and the names of various functions in the
Object Aggregation extension.
The more I look into it, the more it seems like Overloading section
(and any other part of the manual which refers to properties as
"members") needs to be corrected, and this usage normalized
throughout the documentation. In much of the documentation, in fact,
it seems that the only things which would need to be corrected would
be the links to the Overloading section and some more recent docs,
as it looks like the oop5 extension may have been where this usage
of "member" to mean "property" may have arisen. In many other parts
of the documentation, "property" is the term of choice.
If we decide to indeed go this route (Philip, any thoughts on
this?), I have already made the changes in most places in my
checkout of the doc tree and can commit quite readily.
Oddly, I wasn't expecting this thread to go in this direction. :)
The above (properties) sounds like the proper route, and appears ready
for commit.
Regards,
Philip