Wrong. I was curious so i tested it (i've been experimenting with Flex 2). The following code outputs "blah blah":
var foo:Function = function() {}
foo.prototype.someMethod = function() { trace("blah blah"); }
new foo().someMethod();
I think the prototype syntax was kept to maintain backwards compatibility.
class foo {
public function someMethod() { trace("blah blah"); }
just different approaches to the same problem
Wrong. I was curious so i tested it (i've been experimenting with Flex 2). The following code outputs "blah blah":
var foo:Function = function() {}
foo.prototype.someMethod = function() { trace("blah blah"); }
new foo().someMethod();
I think the prototype syntax was kept to maintain backwards compatibility.