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 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 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 : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feat

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 : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https:

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 : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possibl

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 t

Re: [PHP-DEV] Feature request and RFC

2015-02-26 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > 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

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > 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

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 12:15 GMT+01:00 Alexander Lisachenko : > > 2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt : > >> 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 function

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt : > 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 usort() splits

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 11:31 GMT+01:00 Alexander Lisachenko : > > 2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt : > >> 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

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt : > 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() that accepts opti

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > 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

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 20:49 GMT+01:00 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. >

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 a

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > 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

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 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 perhaps get a vo

[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