[squeak-dev] FileList2>listForPattern(s): and MessageSend abuse

Bob Arning arning315 at comcast.net
Tue Oct 3 20:07:51 UTC 2017


FWIW, #listForPattern: was the original method many moons ago. FileList 
had one version and then FileList2 had another that was more attuned to 
EToys. The plural patterns version came along sometime after 2001.


On 10/3/17 3:59 PM, tim Rowledge wrote:
> FileList2 has both #listForPattern: and #listForPatterns: I cannot find any usage of the #listForPattern: and it also looks like it might be a left over from some EToys experiment. Given the possibilities of confusion between the tow I’d prefer to remove it.
>
> Both methods also try to handle having the fileSelectionBlock be a MessagesSend, and do it horribly. Using #isKindOf: is not a nice thing.
> a) I can’t find any place where a MessageSend is actually meaningfully used except an EToys method where a Block would be at least as good and easier to understand, so why even have the option?
> b) the usage seems poor - why set the arguments, evaluate the MS and then empty the arguments instead of simply treating it as a Block? I might be missing some subtlety of MessageSend I suppose, but given the mess of code in that class I wouldn’t be surprised.
>
> Does anyone know why we shouldn’t remove #listForPattern: and clean out the (mis)use of MessageSend in #listForPatterns: ?
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Two wrongs are only the beginning.
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171003/5f321cd0/attachment.html>


More information about the Squeak-dev mailing list