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.

2
  • You seem to be advocating against OOP here, where the fundamental principle is "tell, don't ask". Following the advice here is what normally leads to code riddled with useless "getFoo", "setFoo" and "execute" calls. OOP is about combining data and behavior, not separating them. Commented Oct 4, 2014 at 3:26
  • @Aaronaught It's true that I'm against OOP, but I certainly wouldn't recommend setFoo calls, since that implies mutable data. Altering the contents of variables/properties is an effect, which causes all calculations using that data to become impure. I wouldn't recommend execute calls per se, but I would recommend runFoo procedures for executing actions based on their arguments. Commented Oct 4, 2014 at 21:17