Wiggins d'Anconia <[EMAIL PROTECTED]> wrote:
> 
> ------------------------------------------------
> On Fri, 10 Oct 2003 09:11:28 -0700 (PDT), Jeff Westman <[EMAIL PROTECTED]>
> wrote:
> 
> 
> > 
> > I know perl returns the last value (statement?) by default, but doesn't
> it
> > make it more readable (or self-documenting) to the next person who may
> come
> > along what my intent is?
> > 
> 
> Just so your opinion is backed up, I am very glad you said that and
> definitely appreciate it :-). But I am one of those "lets be explicit about
> what I mean" programmers, at least in any thing over 10 lines of code, but
> then I type faster than average which may be why I was never concerned
> about a few extra characters here and there, and I have never had to work
> over a 900, 1200, 2400, baud modem....
> 
> To put it another way, IMHO, you will *never* be frowned upon for including
> a 'return' when that is what you mean, but be prepared for a thrashing the
> first time you leave an open ended function that returns a value that it
> shouldn't and you break someone else's code because of it.

Hi Wags,

Not sure what you mean by 'open ended function'.  Seems to me there would be
more danger for someone to accidently add code below my last line in my
function.  Put another way, using a 'return' statement is explicit, whereas
leaving it as the so-called perl way, leaves it implicit and open to someone
adding their own code below that -- which would then blow up the expected
returned value.

I'm all for making things consise and effecient, but intent and clarity are
equally important :)


-Jeff

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to