Login  Register

could we agree to remove caseOf: and caseOf:otherwise:

Posted by stephane ducasse on Feb 11, 2011; 9:43pm
URL: https://forum.world.st/could-we-agree-to-remove-caseOf-and-caseOf-otherwise-tp3302475.html

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.

Stef