Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 5
    Anonymous downvoter, please, leave a comment! I am sure this is a correct answer, but if I did not explain something well, give me a chance to improve it. Commented Dec 6, 2016 at 8:56
  • 1
    Maybe, the answer could be enhanced with examples of the problems mentioned related to the case #2. These could be a good argument in favor of the case #1, and they would be giving hints about why #2 is not advisable. Commented Dec 6, 2016 at 12:15
  • 6
    I downvoted too... I read your link. While I think your answer is reasonable, I think that "principle" is essentially BS. e.g. "Loops should ideally contain a single statement (usually a method call)." ??? In the real world, this would be bad for readability and maintainability in many cases. Principle sounds like it was written by someone in an ivory tower. Commented Dec 6, 2016 at 14:06
  • 1
    Problem is how to design the right sequence with the less coupling possible. SLA might help to reduce the length of the sequence. But not the sequence Itself. Chaining the sequence like case #2 comes up with several shortcommings (like testing and coupling). If you applies the Doc's SLA approach to the whole sequence, you end up with the case #1 as the preferable scenario... In many planets createWorld() have not ended with createAnimals(). So far we know, only the Earth accomplished such sequence Commented Dec 6, 2016 at 18:33
  • 1
    @PieterB: having methods on the same abstraction level does not necessarily mean they are independend from another, that is a different thing. Commented Dec 6, 2016 at 19:21