Separating a Hash type from Object

Neil Mix nmix at pandora.com
Wed May 2 22:11:48 PDT 2007


On May 2, 2007, at 9:40 AM, Andrew Dupont wrote:

> I'm entirely in favor of a way to override "." and "[]", whether or
> not ES4 introduces a magic Hash class. That, at least, gives the
> developer a chance to solve the problem on her own.

Wouldn't catchalls effectively serve this purpose?

dynamic class Hash {
	function set *(ident, val) {
		this["_" + ident] = val;
	}
	function get *(ident) {
		return this["_" + ident];
	}
}



More information about the Es4-discuss mailing list