No subject

Michael Turner leap@REDACTED
Thu Sep 17 13:18:06 CEST 2009



On 9/17/2009, "Bjorn Gustavsson" <bgustavsson@REDACTED> wrote:

>On Mon, Sep 14, 2009 at 6:22 PM, James Hague <james.hague@REDACTED> wrote:
>> This is easy to do in Erlang, because the compiler is very literal:
>>
>>   fix_tuple({H, H}) -> {H, H};
>>   ...
>>
>> That ensures that identical looking elements in the tuple are sharing
>> memory locations.  But there is absolutely no reason the compiler has
>> to do this.  It would be perfectly valid to optimize away the entire
>> function, just returning the original value.
>
>We have no intention of introducing "optimizations" that would break
>that code.

But is James correct in implying that the semantics of Erlang admit of
such interpretations?

-michael turner



More information about the erlang-questions mailing list