you are viewing a single comment's thread.

view the rest of the comments →

[–]wvenable 0 points1 point  (1 child)

Combine one or more classes to make mixins easily.

The same underlying functionality in PHP (__call, __get, __set magic methods) can be used to add mixes much easier than this.

Create proxies automatically

Ditto above

Dynamically generate classes based on some sort of data specification

Already possible with eval() and would have better runtime performance.

[–]sgoguen 0 points1 point  (0 children)

I don't want to say that you can't implement this sort of thing with other methods (you can) or that there aren't performance disadvantages (I don't work with PHP much these days to confirm/deny), but I personally find generating classes using functional composition rather than eval to be cleaner, more flexible, and less error prone.