| 11 Dec 2025 |
Charles | identifiers can contain - and cannot start with a number | 19:44:33 |
neobrain | oh, that's an interesting perk. I'll have to try and see if I can find any good resources on it | 19:46:44 |
Charles | what's not clear to me though is how to actually reference the value contained in the variable "1-a" | 19:46:53 |
Rutile (Commentator2.0) feel free to ping | "and cannot start with a number" if you look closely: "1-a" = 0 worked :D | 19:49:04 |
rosssmyth |  Download image.png | 19:49:08 |
Charles | it's quoted, which is handled specially | 19:49:27 |
rosssmyth | very funny thing I found recently | 19:49:27 |
rosssmyth | you can quote them and then you cannot name them after defining them | 19:49:41 |
rosssmyth | very funny | 19:50:09 |
Charles | normally this is okay because the non-identifier is an attrset key which you can access, like this
{"1-a": "foo"}."1-a"
| 19:50:59 |
Charles | * it's quoted, which is handled specially, so no | 19:51:30 |
Rutile (Commentator2.0) feel free to ping |  Download image.png | 19:51:50 |
Charles | what about it? it's following the same rules | 19:53:32 |
Rutile (Commentator2.0) feel free to ping | one can access them even without the quotes | 19:53:59 |
Charles | no | 19:54:06 |
Rutile (Commentator2.0) feel free to ping | well, i just did | 19:54:23 |
Charles | that's getting parsed as one minus the value stored in the variable a minus one | 19:54:23 |