I think that the title says it all. Maybe I should ask: Is it ever bad to not use a method to return the variable, or its value? An example would be a 2-d point class with an x and a y variable.
Is there anything wrong with using myPoint.x
to get the x variable of myPoint
as opposed to myPoint.xValue()
, which simply returns mypoint.x
?