in reply to Re^8: Mutator chaining considered harmful
in thread Mutator chaining considered harmful
Let's go through your argument. You said:So, basically you are saying you don't think the method names are picked appropriately?No, that's not what I'm saying.
It is more difficult to decipher, because it's ambiguous. The ambiguity must be resolved somehow. In the first example, you have to follow the chain of methods and know what type of thing they return. In the 2nd example, the variable name and usage is a big clue that helps resolve the ambiguity.Which to me means that you are purely relying on the name of the temporary variable to document what the (first) method returns. And this is because you otherwise don't know what's being returned. However, variable names follow the same rules as method names. Hence, if a variable name can document what value it contains, so can a method name. But you couldn't determine from the method name what it returned.
Hence the conclusion that you find the method name used inappropriately.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Mutator chaining considered harmful
by ihb (Deacon) on Jan 03, 2005 at 20:37 UTC |