[Cuis-dev] unnecessary punctuation

Mark Volkmann r.mark.volkmann at gmail.com
Thu Jun 13 06:14:54 PDT 2024


On Thu, Jun 13, 2024 at 12:56 AM Vanessa Freudenberg via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

>
>> Doesn't it seem like the compiler could also be optimized to recognize
>> when the values passed are literal values and then perform the same
>> optimization it does for blocks? I understand it doesn't do that currently
>> and so it is more efficient to pass blocks.
>>
>
> How would the compiler know if those “literal” objects understand #value?
> And how could it be sure that #value returns the same object, unchanged?
>

I want to understand this concern. Is it that some code could override the
value method for strings, numbers, or booleans to differ from what the
Object class provides (which is to return the same object unchanged)?
Wouldn't the same concern exist for blocks?

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240613/78196dd6/attachment.htm>


More information about the Cuis-dev mailing list