<div>I&#39;d like to get some feedback from the Racket group regarding Object Oriented vs Functional styles.  I know this can be a bit of a quagmire, so apologies if it&#39;s not appropriate to post it here.  I just thought I&#39;m likely to get some of the more thoughtful replies from this group.</div>

<div><br></div><div>I&#39;ve read the paper here: <a href="http://www.cs.rochester.edu/~cding/Teaching/254Fall2001/Assignments/tr98-299.pdf" target="_blank">http://www.cs.rochester.edu/~cding/Teaching/254Fall2001/Assignments/tr98-299.pdf</a> which outlines the central problem as having to choose between extensible variants (OO) and extensible tools (functional).  The paper proposes the extensible visitor pattern as a solution, and ultimately rests in the OO camp.  The next paper: <a href="http://www.ccs.neu.edu/racket/pubs/icfp98-ff.pdf" target="_blank">http://www.ccs.neu.edu/racket/pubs/icfp98-ff.pdf</a> goes a step further by showing how Racket specific features such as Units and Mixins can eliminate the need for the extensible visitor design pattern, and again, lands firmly in the OO camp.</div>

<div><br></div><div>In contrast, I&#39;ve been playing a lot with Clojure and reading Rich Hickey (<a href="http://www.infoq.com/presentations/Value-Values" target="_blank">http://www.infoq.com/presentations/Value-Values</a> and <a href="http://www.infoq.com/presentations/Simple-Made-Easy" target="_blank">http://www.infoq.com/presentations/Simple-Made-Easy</a>) and he proposes the opposite approach:  OO&#39;s time has come, and that through powerful functional languages you can achieve encapsulation, polymorphism and extensibility in a simpler manner without the complexity of OO techniques.</div>


<div><br></div><div><div>I&#39;m curious as to the opinion of this community regarding Rich Hickey&#39;s stance on applying immutable values and pure functions to nearly every programming problem.</div><div><br></div><div>
Regarding the first two papers discussing Object Oriented and Functional approaches to reuse, I&#39;m wondering:</div><div><br></div></div><div>1.) Do generic functions (multiple dispatch) in a language not empower the functional arguments in the first two papers by Matthias and Matthew (and others)?  If I can add new functions with the same name that dispatch on new variants as they are added, is this not a simple solution to the extensibility problem in a functional style?  Does this not allow for reuse of both the original components <i>and</i> the existing clients?</div>

<div><br></div><div>2.) Does there exist an obvious class of problems that are better suited to an object oriented design vs functional and vice-versa, or is the power of such languages as racket reducing the OO vs Functional debate to a religious war, whereby both methods achieve reuse and it&#39;s just a matter of preference?</div>
<div><br></div><div>Thanks a lot.</div>
<div><br></div><div><div>-- <br>Talk to you soon,<br><br>Scott Klarenbach<br><br>PointyHat Software Corp.<br><a href="http://www.pointyhat.ca" target="_blank">www.pointyhat.ca</a><br>p <a href="tel:604-568-4280" value="+16045684280" target="_blank">604-568-4280</a><br>



e <a href="mailto:scott@pointyhat.ca" target="_blank">scott@pointyhat.ca</a><br>
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">200-1575 W. Georgia</span><br>Vancouver, BC <span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">V6G2V3</span><br>
<br>_______________________________________<br>To iterate is human; to recur, divine
</div></div>