Joel VanderWerf
7/12/2008 11:14:00 PM
Tim Pease wrote:
> On Jul 12, 2008, at 3:36 PM, Dave Bass wrote:
>
>> ara.t.howard wrote:
>>> foo.bar.foobar.barfoo.method
>>
>> Surely the aim of all programming is to pack as much functionality as
>> possible into a single line of code. Everyone knows newlines are
>> horrendously expensive, so they should be used sparingly. ;-)
>>
>
> I've found that my instantiating only a single newline and passing
> around a reference has helped my coding style immensely!
And why not do away with \w+ method names, while we're at it?
NEWLINE = "\n"
class Foo
define_method NEWLINE do
"bar"
end
define_method NEWLINE*2 do
"baz"
end
end
p Foo.new.send(NEWLINE)
p Foo.new.send(NEWLINE*2)
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407