# Which would you rather use

**URL:** <https://forum.kirupa.com/t/which-would-you-rather-use/304400>\
**Category:** Uncategorized\
**Created:** [February 7, 2010, 8:41am UTC](https://forum.kirupa.com/t/which-would-you-rather-use/304400 "2010-02-07T08:41:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [February 7, 2010, 8:41am UTC](https://forum.kirupa.com/t/which-would-you-rather-use/304400/1 "2010-02-07T08:41:51Z")

</div>

. . . for a collection of data, like a set of stored variables.

A loosely typed Proxy subclass which could still handle type checking internally but would lose strict typing in its interface. This would allow you to set/get/etc the variables as if the were properties of the instance, eg:

```auto
var myCollection:Collection = new Collection();
myCollection.x = 3;
trace(myCollection.x);
delete myCollection.x;

```

**[SIZE=“4”]OR[/SIZE]**

A strongly typed Object subclass which obviously allows strict typing but requires that you use get and set methods:

```auto
var myCollection:Collection = new Collection();
myCollection.setVar("x", 3);
trace(myCollection.getVar("x"));
myCollection.delVar("x");

```

The second method seems like a jump back to Flash Player 4 but loose typing is equally lame.

**[SIZE=“4”]Thoughts???[/SIZE]**

Thanks! :hoser:
