Comment

Comment by pluc

That code is so bad. Who does this?!

    return ($this->head === 0 && $this->tail === $this->size - 1) || $this->head === $this->tail + 1;
Or this?

     $return = $this->next?->resetPrevious();

Or this!!!

    $this->tail =
            $this->tail?->setNext(new Node($this->tail, null, $value))->next
            ?? $this->head = new Node(null, null, $value);

Or leaves typos in their code?

    elseif ($this->tail === $this->size - 1) {
            $this->tail = 0;just a tiny
        }


I get that PHP has a bad rep but this ain't helping.
parent pluc 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton