I haven't found anything about this approach so far. So I figured I'd ask you guys how you feel about it. Would you consider this good or bad?
Example in PHP:
public function __construct(Cache $cache = null)
{
$this->cache = $cache;
// Create default cache if none has been provided
if (null == $this->cache) {
$this->cache = new SomeCache();
}
}