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

Stéphane Ducasse stephane.ducasse at inria.fr
Wed Feb 16 21:31:00 CET 2011


yes now do not think that I'm implying that you are not able to implement a decompiler.
Now we have something else to do that dealing with the optimisation of a stupid method.
This is all my point.
Let us focus on the real problems. eliot is crying for caseOf: but we have 3 users. 

Stef


On Feb 16, 2011, at 9:23 PM, Marcus Denker wrote:

> 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