[rspec-users] class << self considered harmful... really?
mark at mwilden.com
Thu Nov 27 20:27:20 EST 2008
On Thu, Nov 27, 2008 at 5:12 PM, Brian Takita <brian.takita at gmail.com>wrote:
> I suppose that we can write our entire program with one LOC. I suppose
> thats following YAGNI. Hell, why use do end? Its two extra lines of
> code all over the place.
That's not YAGNI. :) We need clarity now - there's no 'gonna' about it. I
was responding to the idea that we should always use class << self in case
we need the construct later.
> >> I think we also like how consistent conventions and delineation of
> >> responsibility make code faster to read and understand.
> > Agreed, but I think this begs the question under discussion.
> I don't follow. Can you clarify?
I just thought the statement above assumes the issues in contention in order
to bolster its argument. It assumes that using def self.foo is not a
consistent convention and doesn't delineate responsibility. That's not a
given - it's one of the things we're discussing.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users