2017-11-07 10:30 GMT+01:00 Denis Kudriashov <[email protected]>:

> On Mon, Nov 6, 2017 at 9:52 PM, Nicolas Cellier
>> <[email protected]> wrote:
>> > Travis has just seeded the very simple and light library with chaining:
>> >
>> >     points sorted: #x ascending , #y descending.
>> >
>> > Denis then added possibility to sort properties even if undefined, a
>> common
>> > case:
>> >
>> >     people sorted: #name ascending undefinedFirst , #age descending
>> >
>> > And he started to use subclasses with the intention to enrich the
>> library I
>> > presume.
>> > But current implementation does not use composition.
>> > It adds an instance variable undefinedDirection to PropertySortFunction
>> and
>> > specific behavior.
>>
>
> Just little note. I not introduced anything new. In original Pharo version
> all this states were part of single SortFunction. And for example direction
> and undefinedDirection were used only in the mode with one arg block or
> selector.
> So I just split it by subclasses for existing uses cases.
>

Exactly, the inst var were from original author Travis Griggs.
The fact that you split the classes put us on the way to rethink the whole
library,

The addition of undefinedDirection is just what lighted my own bulb on.
I absolutely don't want to denigrate this work, on the contrary.

Thanks for initiating the refactoring

Reply via email to