Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Why Julia values types are inmutable?

$
0
0

In C#, you have structs, that are value types. Value types are types that are passed by value, and can be efficently inlined in stack for example. The more similar thing that I can see in Julia are inmutable types. As I understand it, in C# sometimes you want to use structs for perfomance reasons, and in Julia, you want to use inmutable types for the same reasons: avoid boxing mainly.

So, my question is: why the most similar thing in Julia to C#'s value types is inmutable too? Why not only allow pass by value types and take inmutability as a orthogonal thing?

4 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795