4 ms·
> In the background "var a=i, var b=a+j", might compile as something like "var b = i; b+=j"; Believe it or not, many compilers internally represent mutable var
by sobellian 9y ago
> In the background "var a=i, var b=a+j", might compile as something like "var b = i; b+=j";
Believe it or not, many compilers internally represent mutable variables as a sequence of immutable variables: https://en.wikipedia.org/wiki/Static_single_assignment_form https://en.wikipedia.org/wiki/Static_single_assignment_form
Edit: I should clarify that I mean "immutable" in the context of primitive values like integers.