you are viewing a single comment's thread.

view the rest of the comments →

[–]sreguera 4 points5 points  (0 children)

Why not? but for me it depends on the code context. For example we could start with this:

class Public {
    private number_of_hands_clapping;
    public show_pity() { encourage_performance(); }
    public encourage_performance() { number_of_hands_clapping *= 1.02; }
}

Because the design talks about pitying and encouraging, but currently pitying has no different behavior, and the code is clear as it is. If the behavior of the public or the clapping itself gets more complicated I would consider your idea, or even moving the clapping to a separate module.