returning(...) ?
Ezra Zygmuntowicz
ez at engineyard.com
Tue Sep 4 17:02:15 EDT 2007
On Sep 4, 2007, at 1:57 PM, Duane Johnson wrote:
>
> On Sep 4, 2007, at 2:46 PM, Brian Candler wrote:
>
>> The following construct is an ActiveSupport-ism:
>>
>> returning(Foo.new) do |foo|
>> ...
>> end
>>
>> I don't especially like it, since it's both more verbose and less
>> efficient
>> than the direct alternative:
>>
>> foo = Foo.new
>> ...
>> foo
>>
>
> I think it should go too. It doesn't add much for readability (even
> though it removes one repeated noun) and seems quite a bit slower.
>
> Duane Johnson
> (canadaduane)
>
I'm fine with axing it.
Cheers
-- Ezra Zygmuntowicz
-- Founder & Ruby Hacker
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)
More information about the Merb-devel
mailing list