Maybe some lint rules could detect the usage of non portable methods... Alexandre On 5 Jan 2009, at 11:56, Lukas Renggli wrote:
I published to the inbox some cool collection extension methods that we use all the time in Moose. flatCollect:, collectAsSet:, and groupedBy:
I think Squeak already has far too many of these methods. I would rather like to see them all removed, than new ones added. As an author and maintainer of many Smalltalk framework I experience daily the pain such methods cause, as they are inherently non-portable not only between smalltalk dialects but even between users of exactly the same image.
Let me give you an example: Seaside used SequenceableCollection>>#pairsDo: in various places. The we got complaints that almost all Smalltalk platforms already provide such a method, but they all implement it entirely different. Some iterate over the combinatorial pairs, some over the consecutive pairs, some ignore an odd number of arguments, some raise an exception, etc. At some point we learned that a famous company using Seaside has their own proprietary override of this method. Today we use the ANSI #to:do:. It is ugly, but it works everywhere as it is part of ANSI Smalltalk.
I would prefer to have such extension methods separate from the core.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.