On 18 April 2013 23:02, Norbert Hartl <norb...@hartl.name> wrote: > > > Am 18.04.2013 um 22:15 schrieb "Sean P. DeNigris" <s...@clipperadams.com>: > >> I tweaked the code because in my most common case, I don't care that it's >> e.g. aByteString, but only that it's aString: >> >> (argument isKindOf: String) ifTrue: [ ^ 'aString' ]. >> (argument isKindOf: Collection) ifTrue: [ ^ 'aCollection' ]. >> (argument isKindOf: Integer) ifTrue: [ ^ 'anInteger' ]. >> >> Am I the only one, or would this be useful for everyone? lmk and I'll >> prepare a slice... >> > Sure, strikes me all the time! What keeps you from delegating this to the > argument object itself. It doesn't need to be the name selector. > Indeed... To the hell these case statements. It should be one-liner:
^ argument class canonicalArgumentName > Norbert -- Best regards, Igor Stasenko.