RE: "Circular require considered harmful"

Andy Jones <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <[email protected]>
>>>>>>>>
This is pretty common mistake (I think) and is a signal that your code is too
coupled.
<<<<<<<<

This.   In my case the thing that got me thinking clearly about dependency and coupling was POODR ("Practical Object Oriented Design in Ruby", by Sandi Metz).

Short version: class B shouldn't really care whether that object passed as a method parameter is a class A object or not.  It should only care that whatever the object is, it can behave in the right way...


Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer>

Please note that we have updated our privacy policy in line with new data protection regulations. Please refer to our website to view the ways in which we handle your data.

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.