From: Junio C Hamano Date: Sun, 17 Sep 2006 02:29:50 GMT Subject: Re: [PATCH] gitweb: Make git_get_refs_list do work of git_get_references Message-ID: <7v4pv78btt.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <7vejub8cms.fsf@assigned-by-dhcp.cox.net> Junio C Hamano writes: > The code I was complaining about tries to do something like > this: > > sub that_sub { > ... > return wantarray ? (\@bar, \%foo) : \@bar; > } > > and it is not done for optimization purposes (i.e. "if the > caller only wants one and we are returning \@bar then we do not > have to compute \%foo which is a big win" is not why it does > this wantarray business). Note. I did not mean to imply conditional return should be done for performance reasons. And I do not think the way this conditional return is done serves better DWIMmery, which was my primary complaint. So I should probably have said "It's not for better DWIM, it is not even for better performance, and I do not see a point".