Re: Most specific superordinate concept of variable and method?
Stefan Ram wrote:
Certain identifiers in Java designate either a
variable or a method.
For example, in
void example( final java.awt.geom.Point2D.Double point )
{ return point.x + point.getY(); }
??point.x?? is a variable, while ??point.getY?? is a method.
And both are members of 'Point2D.Double', as 'Point2D.Double' is a member of
'Point2D'.
So, it seems to me that one can teach that <object>.<name>
or simply <name> always designates either a variable or a
method, whenever <name> is written with a lowercase first
letter (and is not a package name). (Even if you could find
some exception to this rule, I would like to use this
as a simplification for beginners classes.)
Now, it would be niece if there would be a handy
superordinate concept ????? of variable and method, so that
could say that such a name always designates a ?????.
I could use ??entity??, but that would be too broad, because
there are more entities than just variables and methods.
I could use ??member??, but that reminds much of C++ and also
would only apply to <object>.<name>, but not to a simple <name>.
So, does anyone know a most specific superordinate concept
of variable and method, that is a word that designates both
variables and methods, but not much more?
For example, the most specific superordinate concept of
cat and dog I can find right now is ??Carnivora??. ??Mammalia??
also is a superordinate concept, but less specific; while
??Canidae?? is too specific, because it applies to dogs only.
I don't think there is one. In your specific example of something to the
right of a "dot", the superordinate (cool word) is "member". Methods, of
course, cannot be anything but members. But a local variable doesn't share a
superordinate with methods that I can think of other than "thingie".
Think from your own perspective - what do methods and variables share, other
than being Java fundamentals?
I don't find the search for a common concept very useful. What's the
superordinate between a boulder and a dog? Both occur in nature.
--
Lew
All distinctions are artificial.