Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key = $element) { if ($previousKey === null) {

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 19:05, Rowan Collins a écrit : On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key = $element) {

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable.

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 15:19, Rowan Collins a écrit : On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature

Re: [PHP-DEV] Feature request and RFC

2015-02-27 Thread Rowan Collins
Thomas Gielfeldt wrote on 24/02/2015 16:17: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting on. I think the reason

Re: [PHP-DEV] Feature request and RFC

2015-02-26 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt tho...@gielfeldt.dk: I have some more proposals for how to implement this interface. Should we create an RFC for purposes of discussion, or do you usually do this in the mailing lists? Best interface is described by the one single method: sort()

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 11:31 GMT+01:00 Alexander Lisachenko lisachenko...@gmail.com: 2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt tho...@gielfeldt.dk: I have some more proposals for how to implement this interface. Should we create an RFC for purposes of discussion, or do you usually do this in the

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt tho...@gielfeldt.dk: Yeah, but the problem with this, is that your class' sort method, you have to implement all the possible permutations the flags can produce. This basically just squeezes the 11 functions into 1. The 1 interface with sort() and

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 12:15 GMT+01:00 Alexander Lisachenko lisachenko...@gmail.com: 2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt tho...@gielfeldt.dk: Yeah, but the problem with this, is that your class' sort method, you have to implement all the possible permutations the flags can produce. This

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Stanislav Malyshev
Hi! I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting on. Can't you sort any class that provides ordered list of elements and

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 20:49 GMT+01:00 Stanislav Malyshev smalys...@gmail.com: Hi! I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Benjamin Eberlei
Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and

[PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting on. Thanks Br, Thomas Gielfeldt

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei kont...@beberlei.de: Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt tho...@gielfeldt.dk wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I