in reply to Re^3: chaining method calls
in thread chaining method calls
The trouble is, that sort of construct already has a meaning and this isn't it. Chaining methods on different objects is common. Like this, for example:$my_object_variable->foo($x)->bar($y)->ni($z);
That kind of thing is common on most OO languages, and it's what I expect when I see chained method calls. This "return yourself" business foils my expectations.$car->wheels()->turn('right');
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re^3: chaining method calls
by Ovid (Cardinal) on Jun 12, 2003 at 21:06 UTC | |
by dws (Chancellor) on Jun 12, 2003 at 21:12 UTC |