[Pharo-project] could we agree to remove caseOf: and caseOf:otherwise:
siguctua at gmail.com
Sun Feb 13 14:08:13 CET 2011
On 13 February 2011 09:05, Tudor Girba <tudor.girba at gmail.com> wrote:
> 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.
Yes, i know the case where its useful:
it used by VMMaker code generator,
which translating caseOf: to C switch statement :)
> On 13 Feb 2011, at 08:57, Stéphane Ducasse wrote:
>> Hi ricardo, igor and levente
>> I really want to remove caseOf: since years.
>> - 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.
>>> 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.
> "Value is always contextual."
Igor Stasenko AKA sig.
More information about the Pharo-project