[Pharo-project] could we agree to remove caseOf: and caseOf:otherwise:
stephane.ducasse at inria.fr
Tue Feb 15 16:29:38 CET 2011
>>> you use caseOf: for the generation of C in Slang and VM maker.
>>> Now this means that
>>> - it does not need to be inlined
>>> - it could be packaged with VMMaker
>>> Are these two points correct?
? Apparently igor is just saying the contrary. You probably say no for the second point.
I can understand that when we want to generate switch in C this is better to have that at the AST level.
Now I do not see why this would be needed to inline it.
>> VMMaker is used in many images, not just Pharo. And #caseOf:
>> is used in packages other than VMMaker.
Do you have a list?
>> So moving it into the
>> VMMaker package would be a Bad Thing To Do.
> I agree.
> Then probably, Pharo should move it to separate 'Crap-compat' package.
Yes this is what I will do. I will keep that name and put a big warning.
> You don't need to remove #caseOf: implementation. I can stay.
Well yes we can always turn around. Now in my house I regularly empty my garbage can.
> remove a compiler hacks for it :)
> P.S. i patched MessageNode class>>initialize
> to test if VMMaker can work without compiler support of caseof:
> and as it was expected it works quite well.
> I recompiled VMMaker package and then generated full source code of
> everything, and then built VM. No any errors.
Good to know that.
We should rewrite all the users of caseOf: in Pharo and add a lint rule checking them
and one day we will remove it. Because we cannot drag all these stuffs forever.
More information about the Pharo-project