From: Eric Hodel Date: 2006-11-17T07:55:36+09:00 Subject: Re: #returning and #tap On Nov 16, 2006, at 1:57 PM, Joel VanderWerf wrote: > Eric Hodel wrote: >> I would write it: >> def foo >> return @foo if @foo >> @foo = Foo.new >> @foo.bar = 'bar' >> @foo >> end >> $ wc >> ... >> 6 14 77 >> Ten characters and one line more typing, but less punctuation. >> (And those ten extra characters will be mostly be handled by my >> tab key.) > > But you have to type @foo _five_ times, instead of once. Oh, well. > It's a matter of taste. No, just @. I like my friendly editors. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com