public function add($delegate, string $name = null, int $priority = 0) : self
    {
        // Which name should we use?
        // Micro-optimization note: mt_rand() turned out to be several times faster than uniqid and somewhat
        // faster than counting the current number of delegates.
        $name = $name ?: ($delegate instanceof interfaces\Delegate ? get_class($delegate) : 'c\\'.mt_rand());

        if (isset($this->delegates[$name])) {
            throw new \OverflowException("A Delegate with the given name [$name] is already set.");
        }

        return $this->set($name, $delegate, $priority);
    }