[Pharo-project] could we agree to remove caseOf: and caseOf:otherwise:

Stéphane Ducasse stephane.ducasse at inria.fr
Tue Feb 15 07:32:37 CET 2011


> 
> 
> On Fri, Feb 11, 2011 at 1:43 PM, stephane ducasse <stephane.ducasse at free.fr> wrote:
> Hi guys
> 
> let us do another pass at cleaning and realigning the system.
> Could we agree to deprecate caseOf: and caseOf:otherwise:?
> it will simply the compiler, decompiler and also we do not need that at all.
> 
> | z | z := {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}. #b caseOf: z
> 
> =>
> "| z | z := {[#a]->[1+1]. ['b' asSymbol]->[2+2]. [#c]->[3+3]}.
> z detect: [:each | each key value = #b] "
> 
> there is one user which I fixing right now.
> 
> please don't.  It is used in many places in Cog and would be extremely uncomfortable to live without.
> 

Really?
How can we help to remove this dependency? Can igor help?
This means that the decompiler is more complex (more jump to analyze for a messages that is sent may be 
10 times in total in the complete system). I will not compare with ifTrue:ifFalse: and the other inlined selectors
that are really used.

Stef



More information about the Pharo-project mailing list