<div class="gmail_quote">On Sun, Nov 1, 2009 at 2:57 AM, Gregory Collins <span dir="ltr">&lt;<a href="mailto:greg@gregorycollins.net">greg@gregorycollins.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Doing OO-style programming in Haskell is difficult and unnatural, it&#39;s</div>
true (although technically speaking it is possible). That said, nobody&#39;s<br>
yet to present a convincing argument to me why Java gets a free pass for<br>
lacking closures and typeclasses.<br></blockquote><div><br></div><div>I might be wrong, but doesn&#39;t Java&#39;s concepts of inner classes and interfaces together with adapter classes can be used to replace closures and typeclasses in a way?</div>
<div><br></div><div>An inner class allows you to implicitly capture the parent object (&quot;environment&quot;), just like a closure does in a sense.</div><div><br></div><div>Interfaces group together methods, like type classes do. </div>
<div><br></div><div>Although I&#39;m actually a C# fanboy for doing &quot;industrial&quot; programming, I think the Java designers did an excellent job, finding a good balance in language features, ease of use and readability, and although C# does offer closures and many more FP constructs, I really miss the above Java constructs.</div>
<div><br></div></div><br>