I am looking at the String class in Actionscript 3.0.
It has a property called String.length . Internally it's a getter function (or method ?) that returns the length of string.
Why can't it be String.getLength() ?
Methods can take in 1, 2 or more values...so their significance can be understood. But what significance does "property" have? As it is, after all, a function only. So, why the categorization into properties? Is it just for adding an overhead botheration to remember that something has been categorized into a property?
In other words, as a programmer, how am I helped when I'am told that String.length is a property of the String class when I can't find any method for the same.
While writing a program, how would I know what is a property and what is a method?
I appreciate having someone shed some light on this.
V.