<story><title>Writing OOP using OOP</title><url>http://raganwald.com/2014/03/10/writing-oop-using-oop.html</url></story><parent_chain></parent_chain><comment><author>barrkel</author><text>This is a sociological problem.&lt;p&gt;The further up the abstraction hierarchy you customize things in languages that let you do this, the more differentiated your code is and - generally speaking - the more awkward it is to integrate with other people&amp;#x27;s code.&lt;p&gt;Lisp and Smalltalk are at one extreme end of the scale here. They let you define rich DSLs. Unfortunately, application of their most powerful features to any given problem domain typically results in a custom language specific to that domain - so much so that you lose much of the benefits of sharing a language with other programmers. Understanding what&amp;#x27;s going on takes much more work, because you need to understand more of the system before its gestalt becomes clear.&lt;p&gt;DSLs are excellent when they&amp;#x27;re applied to problem domains that are otherwise very clumsy to express, when the problem is widespread, when it doesn&amp;#x27;t intermix too deeply with other domains (i.e. the abstraction is mostly self-contained), and when there is a critical mass of programmers using it - enough that understanding the system at its own level of abstraction is enough for most people.&lt;p&gt;But when you apply the same techniques to relatively humdrum problems like object construction, function binding etc., it&amp;#x27;s best if the language or its standard library has a reasonable approach and everybody uses it. Developing your own ad-hoc language around class construction means that everyone coming into your code needs to understand it before they can truly understand what the code is doing. It&amp;#x27;s a barrier to understanding, and the pros of customization need to be substantially higher than the costs of subtlety.&lt;p&gt;In short, it&amp;#x27;s usually better to be explicit.</text></comment>
<story><title>Writing OOP using OOP</title><url>http://raganwald.com/2014/03/10/writing-oop-using-oop.html</url></story><parent_chain></parent_chain><comment><author>michaelsbradley</author><text>Joose[1] took these patterns about as far as anyone has (open source) as of several years ago; it&amp;#x27;s based on Moose[2] for Perl.&lt;p&gt;When Bill Edney and Scott Shattuck finally release TIBET[3] upon the world (something like 15 years in the making), it will take &amp;quot;real OOP&amp;quot; for JavaScript to a whole new level. TIBET is basically a full-on Smalltalk system (including a kernel, images, modules) for JavaScript, but it&amp;#x27;s not a compile-to-JS kit; rather, it builds right on top of the language, kind of a &amp;quot;super library&amp;quot; for ultra heavy-duty browser based apps.&lt;p&gt;[1] &lt;a href=&quot;https://github.com/Joose/Joose&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;Joose&amp;#x2F;Joose&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;http://search.cpan.org/~ether/Moose-2.1204/lib/Moose.pm&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;search.cpan.org&amp;#x2F;~ether&amp;#x2F;Moose-2.1204&amp;#x2F;lib&amp;#x2F;Moose.pm&lt;/a&gt;&lt;p&gt;[3] &lt;a href=&quot;http://technicalpursuit.com/&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;technicalpursuit.com&amp;#x2F;&lt;/a&gt;</text></comment>