From: Joel VanderWerf Date: 2004-09-17T03:51:46+09:00 Subject: Re: Ex-Perl coders: Howz it feel to convert to Ruby? Mauricio Fern�ndez wrote: > On Fri, Sep 17, 2004 at 03:20:05AM +0900, David A. Black wrote: > >>I was referring mainly to Chris's characterization of yield users as >>different from people who write disciplined, well-constructed code. I >>suspect that Chris didn't really mean it as a slam to yield users >>either, but it kind of read that way. (And I'm at least a frequent >>yield user myself :-) > > > And you can be "disciplined" by Chris' criteria while using yield: > > def foo(arg, &block) > yield > end ...although this does have a small speed penalty as a Proc object gets created by the &block construct, IIRC. Why not just use the rdoc markup as a convention, if you want to be explicit? def foo(arg) # :yields: some_useful_object yield foo(arg) end