In another question, a user pointed out that the new
keyword was dangerous to use and proposed a solution to object creation that did not use new
.
I agree with pez and some here.
It seems obvious to me that "new" is self descriptive object creation, where the YUI pattern Greg Dean describes is completely obscured.
The possibility someone could write var bar = foo;
or var bar = baz();
where baz isn't an object creating method seems far more dangerous.