| 30 Apr 2024 |
@stablejoy:matrix.org | Oh like the assigned value changes while the identifier binds to that value | 12:34:52 |
toonn | Well, in a pure language values assigned to variables don't actually change. | 12:36:43 |
toonn | You can shadow a name but that's not really the value changing. | 12:36:59 |
@stablejoy:matrix.org | Yes thats where my question is coming from. | 12:41:43 |
@stablejoy:matrix.org | x = 2
x = 3
x is 3
let x = 5; in x
5
x stays 3 | 12:42:20 |
@stablejoy:matrix.org | Uh formatting.. sorry. So assingment is said as convention in nix? | 12:42:49 |
toonn | I wouldn't say it's a Nix convention per se. More of a general programmer's convention. | 12:44:21 |
toonn | I also wouldn't worry about it much but maybe that's just me. | 12:46:45 |
@stablejoy:matrix.org | Yeah I was curious because its used in the nix tutorial. | 13:01:18 |
@stablejoy:matrix.org | * x = 2
x = 3
x is 3
let x = 5; in x
5
x stays 3
| 13:02:23 |
@stablejoy:matrix.org | * x = 2
x = 3
x is 3
let x = 5; in x
5
x stays 3 | 13:08:54 |
@stablejoy:matrix.org | * x = 2
x = 3
# x is 3
let x = 5; in x
5
# x stays 3
| 13:09:35 |
@stablejoy:matrix.org | In reply to @toonn:matrix.org I'd probably say assign more often. One difference is you assign a value to a variable, while you bind an identifier to a value. Oh I see now, its like describing two directions. The assignment is describing direction from value to variable and the binding from identifier to value? | 13:18:42 |
toonn | Yes. Though I'm not saying that is the only difference. | 13:32:52 |
| @kha13d:matrix.org left the room. | 14:18:04 |