tazjin/nix-1p

Concerning the Overview: Clarification about the non-Sequential Nature of Nix

Opened this issue · 2 comments

Hey there,

first of all, thanks for compiling this introduction. It's very clear and on-point and quickly brings you up-to-speed with the basics of the language. But since you asked to file an issue if something wasn't perfectly clear, I thought I mention this rather minor point.

In the Overview you clarify in what sense Nix was functional. I think there are two statements that seem contradictory:

  • "It has no concept of sequential steps being executed, any dependency between operations is established by depending on data from previous operations."
  • "Evaluating a Nix expression yields a single data structure, it does not execute a sequence of operations."

I think it's not obvious in what sense there can be previous operations if there is no sequence of operations.

Like I've said, it's a minor point and the main purpose of the document is probably to give an introduction to the syntax and semantics of the language, but I still thought it was worth mentioning.

Hey, thanks for the issue! Hmm, this is an interesting one.

Maybe the fix is as simple as changing it to something like "is established by depending on data from other operations, which Nix then executes first".

I suspect you already understood what exactly this means (i.e. in the simplest case where you have the data of A being needed to calculate the result of B, asking for B will first calculate A), so maybe you can tell me if that phrasing would be clearer?

Also, Kölle Alaaf!

Hey there!

I'm sure if there had been written "other operations" in the first place, it wouldn't have appeared odd to me at all. But I feel like maybe the implications of the non-sequential approach could be made clearer?

I'm certainly no expert – I came to your repo because I wanted to learn about the essential basics of the Nix language after all – but I think the context/buzzword is that Nix files are interpreted declaratively? As opposed to an imperative approach where you would tell the computer step-by-(next-)step what to do, the user describes desired system states, derivations, and the likes? I think it's the responsibility of the package manager how and in what order to bring those about?

I don't know, this certainly isn't the place to get into the intricate details of programming paradigms. Still, I was kind of confused about what the non-sequential computation means and reading about non-imperative programming gave at least some context. Well, if this indeed is the context.

Haha, it is "Kölle Alaaf" very soon. So, you have to make sure to be well-inside when the clock strikes 11:11. ;-)