Re: SplDoublyLinkedList missing insertBefore/After

From: Date: Thu, 29 Nov 2012 18:26:08 +0000
Subject: Re: SplDoublyLinkedList missing insertBefore/After
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-64112@lists.php.net to get a copy of this message
It would be an awesome feature, indeed. Daniel Ribeiro Gomes Pereira Twitter <https://twitter.com/#!/drgomesp> | Facebook<https://www.facebook.com/profile.php?id=100000407054469> | LinkedIn <http://www.linkedin.com/pub/daniel-ribeiro-gomes/21/414/39> iPhone: +55 (48) 9111-0931 2012/11/29 Levi Morrison <morrison.levi@gmail.com> > On Thu, Nov 29, 2012 at 4:38 AM, Rafael Dohms <listas@rafaeldohms.com.br> > wrote: > > I have just noticed that the current SPL inplementation of a > > DoublyLinkedList does not include methods to insert nodes into the middle > > of the list (insertBefore, insertAfter). > > > > After mentioning it I ran into a few people and other outbursts on the > > internet of more people who saw this and complained about it. > > > > I found a bug from 2009 (https://bugs.php.net/bug.php?id=48358) which > > mentions the case and has no Core response at all. > > > > I ask two questions: > > > > 1) Why was this bug never replied to, is there some reason these methods > > should not be implemented? > > > > 2) Is anyone willing to put up a patch for this? I imagine that if you > are > > familiar with C and PHP source this is a quick implementation as its > > standard logic documented everywhere. > > I am creating a library in PHP code that includes a linked list with > this feature ( > > https://github.com/morrisonlevi/PHP-Datastructures/blob/master/src/Spl/LinkedList.php > ). > I'd love for you to use it while you wait for the core to be patched > and give me some feedback. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#64112) next »