Attribute Set or Set

I always struggle with what to call these things: { a = 1; }
I see many people refer to them as “attribute sets”, however the official documentations refers to them simply as “sets”. I would generally be fine with just going with what the official documentation says, but “set” as a data structure already has a meaning, and this is not it.

What do you call this thing: { a = 1; }?

  • an attribute set
  • a set
  • something else

0 voters

2 Likes

I usually call it an “attribute set” though within a running conversation I might contextually shorten it to just “set” to not repeat myself all the time.

I sometimes call it “attribute map”. And it is like a set… where each member has additionally a value assigned, though calling it (attribute) “set” perhaps isn’t ideal.

1 Like

I think this is also relevant for the current efforts to improve documentation. #dev:documentation Do more people have an opinion about the topic?

1 Like

I read the docs phonetically :

“atter-ess” or “atterrs-ses” if I’m feeling goofy.

“atter set” actually though.

I called them “a-lists” in the before times.

@olaf: I think this is also relevant for the current efforts to improve documentation. #dev:documentation Do more people have an opinion about the topic?

I would say yes. Based on what I’ve seen so far, there is a growing consensus1 that there should be a globally consistent terminology to be used across the official documentation resources.

[1]: I think PR#6420 alone provides ample evidence for this statement.

1 Like

I also saw that in this documentation PR “attribute set” is introduced and used right from the beginning: Nix language tutorial by fricklerhandwerk · Pull Request #267 · NixOS/nix.dev · GitHub … so only the nix documentation would need an update, if the section on writing nix expressions stays in that manual.
So I guess this topic is “solved”.

1 Like

@fricklerhandwerk’s PR #6845 has just been merged regarding this topic.

I did not know Eelco felt this way. I for one would be highly supportive of a name change.

1 Like