November 2005
October 2005
March 2005
Mixins for PHP
by 2 others (via)I find mixins very useful in other languages. In Ruby, any class that implements the each method can utilize the Enumerable mixin. Enumerable is a class containing functions which use the each method including: find, grep, and reject. The functions are mixed into the new class's set of functions. Incidentally, that PHP does not implement mixins natively is not a criticism of PHP. PHP's design goals are different from Ruby's.
1
(3 marks)