On Thu, 11 Nov 2010 11:57:40 -0500, Daniel Gibson <metalcae...@gmail.com> wrote:

spir schrieb:
Still, an other case when "new" annoys me is method chaining, because it makes syntax heavier and less readable:
        c = (new C(p)).do(x);
versus:
        c = C(p).do(x);
Or, maybe, the parser could be clever enough to correctly decode:
        c = new C(p).do(x);


Is this really a common case?
Constructing an object, just to call *one* method on it and then throw it away?

If the do method returns this, you aren't throwing it away.

-Steve

Reply via email to