tazjin / nix-1p

A (more or less) one page introduction to Nix, the language.
https://code.tvl.fyi/about/nix/nix-1p
896 stars 24 forks source link

Semicolons are used without defining their use and meaning in the Nix language #21

Open WayneSherman opened 7 months ago

WayneSherman commented 7 months ago

Semicolons ";" are first used in the example here: https://github.com/tazjin/nix-1p/blob/1cf10d3fb78d2500ea46640492e0a92aeda5fe69/README.md?plain=1#L67

But their syntactical use and meaning in the Nix language has not been defined.

I cannot confirm if this is completely accurate, but according to ChatGPT: "In the Nix language, semicolons are used to terminate expressions within attribute sets, function arguments, and let bindings. They signify the end of one statement and the separation from the next, ensuring clear demarcation of different elements within these constructs."