My guess purely:  I thought if a immutable type is big enough, it was 
implemented as a reference type. (Otherwise each time when it is passed to 
a function, a lot of memory copy is performed).

immutable Big
    a1::Int
    a2::Int
    ...
    a1000::Int
end



On Thursday, January 21, 2016 at 3:55:49 AM UTC, [email protected] wrote:
>
> Julia's immutable types are value types and mutable types are reference 
> types. In the Julia docs on types there is a paragraph that begins:
>
>  "It is instructive, particularly for readers whose background is C/C++, 
> to consider why these two properties go hand in hand. [...]" 
>
> However this paragraph only explains why value types should be immutable, 
> it doesn't describe why you can't define a reference type that is 
> immutable. So, why not? 
>

Reply via email to