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

Marcus Denker marcus.denker at inria.fr
Wed Feb 16 21:23:09 CET 2011


Hi,

What about postponing this dicussion to the week of the 7th of march? This will be far easier...
(and I really did not have the energy to follow this discussion. Most of the emails in this thread I did
not read).

	Marcus

On Feb 16, 2011, at 12:12 PM, Stéphane Ducasse wrote:

> 
> On Feb 16, 2011, at 6:12 PM, Eliot Miranda wrote:
> 
>> 
>> 
>> On Tue, Feb 15, 2011 at 11:17 PM, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
>> But it looks like a DSL to me.
>> 
>> No its not.  caseOf: is valid Smalltalk.  It is another control structure defined in the library rather than by the language, just like do:, inject:into: et al. It is extremely useful in certain circumstances.  It can be (and is) optimized.  Functional languages support case statements that are conceptually similar.  caseOf: (and those of functional languages) are *much* more powerful than the switch statement of C:  caseOf: can dispatch on arbitrary values, not just integer indices; caseOf:'s selectors (the things on the left of the ->'s) can be expressions, not just constants.
>> 
>> So caseOf: could be moved to Cog. 
>> 
>> Fine.  Let me be equally pig-headed then. I'm not going to spend any more energy on this, and I'm not going to spend any more energy on Cog in Pharo.  This is ridiculous. 
> 
> Then perfect be mad at me and take all the pharoers in prison. This is the only solution. 
> Since you have the power to do it and I cannot do anything about it. I let you choose if I'm a real assshole, a plain idiot
> or just that I suggest something to ease our future.
> what I suggest is to 
> 	- stop inlining caeOf so that the transition path to OPAL is easier
> 	- let caseOf use for VMMaker.
> 
> It would take 15 min to do that and probably 30 min to fix tools that are using caseOf: out of VMMaker.
> 
> Stef
> 
> 

--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.





More information about the Pharo-project mailing list