News for hackers. Stuff that matters.
Re:Emerging JavaScript pattern: multiple return values by paledot on Thursday October 29, 2020 @09:31AM (#24930248)
While there are isolated use cases for returning multiple values (quotient/remainder being a good example), all of the real-world cases I've seen where the author tried have been a serious code smell, a missed warning that the encapsulation was weak. Refactoring to use single return values or coherent value objects almost always produced cleaner, more readable, more testable code as a result.

There are no comments on this comment yet.