Because it doesn’t work.
It has been a pain for many years, that computer properties can’t be arrays, especially all properties in plugins!
So you often end providing two things:
Something as String()
Something(index as integer) as string
SoemthingCount as Integer
Why? Because Something can return an array, but you can’t directly use it with index.
Imagine, if you will, some code that looks like this:
someClass.someComputedProperty.Append( someItem )
Since the array is computed, that means that someItem is being appended to an array that will be immediately destroyed after the call ends because nothing else is holding a reference to it. Could you tell that from looking at the code? Probably not!
But why would the array be destroyed when you save it in mArray?
IF you store it then you may not have that issue
But there’s no requirement to store it
Its computed so it could be created on the fly and then you have a “copy” that is not retained
In a really simple example of the issue if someClass.someComputedProperty is
Getter() as String()
return array ( "1", "2" )
then the getter is called, the array returned and appended to and thrown away
Nothing holds on to the reference
I think thats the argument Aaron is making
EDIT : ah yeah thats basically it
When you get to the end he ev notes this case where IF the getter is returning some stored property
In the former case, you are creating a new object every time you call SomeProperty’s getter. In the latter case, you are returning a property that’s backed by storage on the class. So the latter case is safe because modifications are actually retained. It’s the former case that causes all of the heartache!