Login  Register

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

Posted by Tudor Girba on Feb 13, 2011; 8:05am
URL: https://forum.world.st/could-we-agree-to-remove-caseOf-and-caseOf-otherwise-tp3302475p3303452.html

Hi,

I also think we do not need caseOf: in the default distribution.

It is probably useful for some cases (like dealing with integers from some external source as mentioned by Levente), but those cases are so rare that we should not affect everyone with this message.

Cheers,
Doru


On 13 Feb 2011, at 08:57, Stéphane Ducasse wrote:

> Hi ricardo, igor and levente
>
> I really want to remove caseOf: since years.
> Why:
> - conceptually wrong (even if this may be nice to have for $A and numbers)
> - to me it looks like coming from another age
> - never needs to use it: of course other people may of course
> - Three less methods in Object
> - only available in Squeak/Pharo
> - but more more more important:
> makes the compiler, decompiler, inliner....., more complex.
> I want opal to get out because we need a better infrastructure: simpler, better compiler.
> - Ideally I would prefer that we can extend the compiler with it and that people needed it just ship a plugin with
> their code.
>
> Marcus is opal dealing with caseOf:?
>
> I did not want to have a war. I thought that it was pretty obvious that we do not really need that.
>
> Stef
>
>> Ok, guys... I'm sorry to interrupt this polite discussion, but this is taking nowhere. Having such strong arguments (for or against) is not helpful for anybody.
>> We all know using #caseOf:otherwise: it's not exactly good style, but sometimes you need to compromise between design and efficiency, and having simple and efficient constructs such as #caseOf: is very good IMHO.
>> You are free to avoid them if your projects don't need it, and if you happen to need extra performance you can always build your own JIT, right? :)
>> But please don't ban people who are willing to sacrifice a little readability for performance reasons. Thanks.
>>
>> Best regards.
>> Richo
>
>

--
www.tudorgirba.com

"Value is always contextual."