develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #56150] return return

Thread Previous | Thread Next
From:
=?ISO-8859-1?Q?Alberto_Sim=F5es?=
Date:
June 21, 2008 03:43
Subject:
Re: [perl #56150] return return
Message ID:
485CDB57.9030509@alfarrabio.di.uminho.pt


Tels wrote:
> On Saturday 21 June 2008 11:05:17 Vincent Pit wrote:
>>> The only thing that speaks for return is that it "speaks" e.g.
>>> looks more nice to the human reader
>> Also for breaking out from a subroutine before its natural end.
> 
> Of course :) I was talking about the usual case at the very end, e.g.
> 
> 	sub foo {
> 		my $x = shift;
> 
> 		my $y = $x + 1;
> 		return $x;		# superflous return
> 	}
> 

Let me be devils advocate. But this function seems it all superflous :)
Isn't it just the ID function? :)

OK, OK :-P
-- 
Alberto Simões - Departamento de Informática - Universidade do Minho
                  Campus de Gualtar - 4710-057 Braga - Portugal

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About