Nicolas:

2014-08-01 17:50 GMT-03:00 Nicolas Cellier <[email protected]>:

>> http://objology.blogspot.no/2010/11/tag-sortfunctions-redux.html
>>
>> Don’t think anyone’s ported it to Pharo yet though.
> +1
>
> Note that I have a public experimental port to Pharo in SmalltalkHub that I
> already announced once (in
> http://smalltalkhub.com/#!/~nice/NiceVMExperiments but I can't tell exactly
> the package name TagSortFunction or something like that, the web interface
> of SmalltalkHub is currently showing me a debugger with nil does not
> understand #data).
> Yes, I know VM-experiments is not the right place for such package, but at
> the time I didn't find where to create a new project...

I decided to embrace you initial port and also made some enhancements
to TAGSortFunctions.

I added the current features:
* Support of MAElementDescription conversion to SortFunction (in
addition to block and unary symbol support)
* Collation of nil elements, deciding whether to put nil at the end or
beginning of the result.
  (similar to the ORDER BY column [NULLS FIRST|LAST] semantics of SQL).

Unit tests for the above described features.

All the added features preserve the original behavior of the sort
functions, so nil collation must be "enabled" explicitly by sending
#undefinedFirst/#undefinedLast to the sort function, otherwise it will
fail if you attempt to compare an object with nil.

I would like to move this to a specific repository in STHub with its
own Metacello config (Magritte support is packaged separately).
Do you agree with this?

Regards!

Esteban A. Maringolo

Reply via email to