On May 17, 2006, at 7:54 AM, Dan Stenning wrote:

we have accessor functions now to emulate properties-  via computed
properties.  This is great for making getter/setter methods behave as
properties.

you could always do this before with a pair of methods like

        someProperty(assigns v as Integer)

        someProperty() as integer


What would be even more useful would be to be able to create
similar accessor methods ( for encapsulation versatility etc ) that behave
to the outside world as ARRAYS.

You can do this with the same paid of methods with something like

        someProperty(element as integer, assigns v as Integer)

        someProperty(element as integer) as integer


One major benefit of this would be to be able to use the FOR EACH construct on these methods. That would give us the control and versatility of using methods and our own code to govern access to lists, arrays etc. while still retaining the power and readability of using FOR EACH as oppoosed to indexes
and ubound type calls.

Not sure that for each will work even if you can do this

I guess some of this might be achievable with new operator overload methods.

Note that C#  already has some features like this - ie to make a class
behave as an array to the outside world.


Any opinions chaps  ( and chapesses )

Already exists and has for a long time

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to