From: David Vallner Date: 2007-02-19T22:58:06+09:00 Subject: Re: return statement On Mon, 19 Feb 2007 14:43:07 +0100, wrote: > Hi -- > > No; Chris knows what he's doing. It's pretty fundamental -- I always > make a point of explaining it when I introduce the topic of methods to > beginners. Otherwise simple things like: > > def of_age? > age > 17 > end > > make no sense. It's basically just a function that performs a > calculation. > For mathemathical functions with a simple enough control flow, I'm ambivalent on the topic. However once a method has a premature return (or four) somewhere, the inconsistency hurts my sensitivities. Using the keyword in such a method as a matter of style gives me one less thing to keep in my head when scanning the code for exit points - either there is only one and it's completely obvious like in your example, or it's every line with "return" in it. David Vallner