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:
parent
7b9f7b9b59
commit
772093ace7
1 changed files with 7 additions and 1 deletions
|
@ -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"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue