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*

4
  • again though that just "feels" messy and not ideal. is generally considered better to break it into multiple methods or just deal with the fact that sometimes you need to work around it? Commented Feb 15, 2012 at 19:54
  • 1
    @maezr How is this messy? If you have a method called "getAnApple" and it returns an apple object which contains the weight, diameter and color, that's about as good as it gets. Commented Feb 15, 2012 at 19:56
  • @maezr - "work around" what? Even scripting languages that allow you to "return multiple items" are not really doing that; they're wrapping them in a dynamic list or array and returning that one thing. Commented Feb 15, 2012 at 19:58
  • @maezr Edited my response to address your concerns. This is of course my opinion. Commented Feb 15, 2012 at 20:00