On Jan 29, 2008 3:02 PM, Stut <[EMAIL PROTECTED]> wrote:
> Why? What exactly do you think you're saving by not putting the
> instance in a variable? I can't think of one good reason to do this.
>
its an esthetic thing; and besides the simple factory method is an
easy workaround to achieve it.
as the article that, Eric, posted mentioned, other languages have
such support; ie javascript:
function Test() {}
Test.prototype = { doSomething : function() { alert('hello'); } }
new Test().doSomething();
this is along the lines of the whole returnAnArray()['someIndex'] thing,
fortunately in this case, theres a workaround in userspace ;)
-nathan