gram on Nostr: npub1e2p79…raqmc There are two things, essentially: values in memory and names that ...
npub1e2p79z2nl0xkd2n0qy52wwvej2y3j8ps28nl4utfsw0apsnc586seraqmc (npub1e2p…aqmc)
There are two things, essentially: values in memory and names that point to these values. Multiple names can point to the same value. In Elixir, you can make a name to point to another value, maybe even of different type, and you can create new values, but you never can modify a value in place.
Consider this Python code
a = []
b = a
a.append(1)
The result is that Both a and b share the same value, so when you modify a, you also modify b. So, both a and b will be [1].
1/2
There are two things, essentially: values in memory and names that point to these values. Multiple names can point to the same value. In Elixir, you can make a name to point to another value, maybe even of different type, and you can create new values, but you never can modify a value in place.
Consider this Python code
a = []
b = a
a.append(1)
The result is that Both a and b share the same value, so when you modify a, you also modify b. So, both a and b will be [1].
1/2