1
Fork 0
mirror of https://github.com/RGBCube/Site synced 2025-07-30 12:37:50 +00:00

blog(nix-iceberg): explain set.a or "mewo" is set-specific

This commit is contained in:
RGBCube 2025-06-06 23:54:15 +03:00
parent 7b9f7b9b59
commit 772093ace7
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -581,7 +581,13 @@ It was created by [t184256](https://github.com/t184256) on GitHub, here is the
## `set.a or "meow"` is set-specific
TODO
[As mentioned previously,](#let-a-1-or-6-in-a-or-9-) the Nix parser is weird and
treats `or` as an identifier when it is not right after an attribute selection
expression.
So, the `or` in `set.key or default` is the keyword, but in `set or default` it
is not, and the latter expression is actually a double function application,
where we apply `or` to `set`, and then `default` to the result of that.
## `builtins.toString [true false true] == "1 1"`