On Mon, 22 Sep 2008 17:25:16 +0300 "Igor Stasenko" <siguctua@gmail.com> wrote:
I see no real usage of #caseOf: or #caseOf:otherwise: in Pharo - just in single place (ProcessBrowser). However, i see a multiple places in Croquet image where it is used in a form of:
cmd := data at: 1. cases := { .... }. cmd caseOf: cases.
Which also proves that it not worth using it, because it can be simply replaced by single line:
Yes, it *can* be replaced, but *should* it be replaced? The three lines above are way more readable than the one line below.
self perform: (cmdSelectors at: (data at:1) ) withPossibleArguments: (Array with: data).
How about going after the creator of the data array first? It seems to be a primitive data structure wanting to become a MessageSend or something similar. Just making smalltalk, s.