If I have to choose between a 1000 line class or one that includes 20 modules I'll choose the former. At least then the problem is apparent.
-
-
@steveklabnik@mikaelj That works, but more like "def self.included(klass); raise "NEED EACH" unless klass.respond_to?(:each); end"Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@steveklabnik@mikaelj also, if you restrict what a mixin CAN do to that explicit interface, it will force people to document/think about itThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@steveklabnik@mikaelj at that point, mixins become encapsulated bits of functionality, not a source of unlimited unrestrained coupling -
@googleninja@steveklabnik It's totally reasonable to have mixins that do not expose a public protocol, rather add int. util. functions.
End of conversation
New conversation -
-
-
@steveklabnik@mikaelj i should stop writing blog posts on twitter… sorryThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.