<?xml version="1.0" ?>
<rss version="2.0">
	<channel>
		<title>Keith's Weblog: Comments on &quot;Mixins in PHP (Or, I hate PHP volume 2)&quot;</title>
		<description>Keith's Weblog: Comments on &quot;Mixins in PHP (Or, I hate PHP volume 2)&quot;, posted on December 12, 2004</description>
		<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP</link>

		<category>Programming</category>
		<language>en-us</language>
		<image>
			<link>http://keithdevens.com/weblog</link>
			<title>Keith Devens .com</title>
			<url>http://keithdevens.com/images/kbd.gif</url>
		</image>

		<item>
			<title>by Harry Fuecks</title>
			<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP#comment6610</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/6230#comment6610</guid>
			<pubDate>Mon, 13 Dec 2004 09:01:48 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;To an extent there's an alternative in Class kit: &lt;a href=&quot;http://pecl.php.net/package/classkit&quot;&gt;http://pecl.php.net/package/classkit&lt;/a&gt; - not quite the same but almost - of course you've got to compile it yourself. You might also get some mileage out of the &lt;em style=&quot;font-style: normal; text-decoration: underline&quot;&gt;_get(), &lt;/em&gt;&lt;em style=&quot;font-style: normal; text-decoration: underline&quot;&gt;set() and &lt;/em&gt;_call() &amp;quot;magic&amp;quot; methods&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;But agree - think object aggregation was a useful tool that should be restored. There's other buzz words it would make possible like AOP and Metaclasses.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;The PHP 4.3.x implementation was good, IMO, as it encouraged use only for exceptional situations, rather than as an alterative to the current inheritance mechanism. So no ones going to go wild with multiple inheritance, which seems to be the &amp;quot;fear&amp;quot; that had it removed.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Some other people with thoughts in the same area;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;&lt;a href=&quot;http://jaxn.phpenterprise.net/blog/archives/383-Why-Aspect-Oriented-Programming-is-Important-for-PHP.html&quot;&gt;http://jaxn.phpenterprise.net/blog/archi...Programming-is-Important-for-PHP.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://jaxn.phpenterprise.net/blog/archives/419-More-on-Aspect-Oriented-PHP.html&quot;&gt;http://jaxn.phpenterprise.net/blog/archives/419-More-on-Aspect-Oriented-PHP.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.futuraworkz.com/index.php?p=8&quot;&gt;http://www.futuraworkz.com/index.php?p=8&lt;/a&gt;&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith Gaughan</title>
			<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP#comment6615</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/6230#comment6615</guid>
			<pubDate>Mon, 13 Dec 2004 22:03:20 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;OTOH, classes just suck anyway. Prototypes Abú!&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by 83.30.198.249</title>
			<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP#comment6620</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/6230#comment6620</guid>
			<pubDate>Tue, 14 Dec 2004 14:16:51 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Looks like I am not alone in thinking that the newer php version we have the more limits we have: &lt;a href=&quot;http://blog.gosu.pl/comments.php?id_news=7&quot;&gt;http://blog.gosu.pl/comments.php?id_news=7&lt;/a&gt;&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Joe Cheng</title>
			<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP#comment6637</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/6230#comment6637</guid>
			<pubDate>Thu, 16 Dec 2004 00:04:36 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Can't you use PHP 5 delegates to fake mixins?&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;&lt;a href=&quot;http://www.zend.com/zend/php5/php5-delegation.php&quot;&gt;http://www.zend.com/zend/php5/php5-delegation.php&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;It all comes down to message passing, after all...&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2004/Dec/12/mixins-in-PHP#comment6667</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/6230#comment6667</guid>
			<pubDate>Sun, 19 Dec 2004 20:41:20 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Thanks for the link, Joe.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;This doesn't do exactly what I want, but it's close. Unfortunately, it doesn't work under both PHP 4 and 5, so I have to program it the brain-dead way &lt;em&gt;anyway&lt;/em&gt; if I want it to work under both. Though maybe I could do something to use object aggregation under PHP 4 and delegation under PHP 5.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;However, it still enforces an artificial separation between the two since I can't do things like access the first class' instance variables from the delegated class through $this, but that's not such a big deal. Though, this is all probably much less efficient than the PHP 4 object aggregation feature since it involves temporary objects and lots of indirection.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Oh yeah, and I'm a &lt;em&gt;huge&lt;/em&gt; fan of prototype-based object systems.&lt;/p&gt;

</description>
		</item>
	</channel>
</rss>
