Re:Golang implementation of Bentley/McIlroy compression
by twotwotwo on Thursday December 19, 2013 @07:09PM
(#6938942)
I don't mind using named returns a lot--they can help to document, and sometimes they save you a declaration you were going to do in the method body anyway.
There are times they can be redundant (Sum(ints) does not need its return value named), or make the code less clear, or they indicate that you're trying to work around having overcomplicated methods by documenting them--I'm not saying always use them. But I don't try to avoid them.
There are times they can be redundant (Sum(ints) does not need its return value named), or make the code less clear, or they indicate that you're trying to work around having overcomplicated methods by documenting them--I'm not saying always use them. But I don't try to avoid them.