Skip to content

RFC 110: Add "inherit-as-list" language construct#5402

Closed
r-burns wants to merge 5 commits into
NixOS:masterfrom
r-burns:rfc-110-inherit-as-list-mvp
Closed

RFC 110: Add "inherit-as-list" language construct#5402
r-burns wants to merge 5 commits into
NixOS:masterfrom
r-burns:rfc-110-inherit-as-list-mvp

Conversation

@r-burns

@r-burns r-burns commented Oct 18, 2021

Copy link
Copy Markdown
Contributor

Initial MVP implementation for RFC 110

Initial MVP implementation for [RFC 110](NixOS/rfcs#110)
This reverts commit 1a22abd.

In preparation for revised implementation
Before:
```
[ inherit (attrs) a b c; ] := builtins.attrValues { inherit (attrs) a b c; }
```

After:
```
[ inherit (attrs) a b c; ] := [ attrs.a attrs.b attrs.c ];
```

The previous desugaring has some potentially nice properties such as
non-significant ordering and no-duplicate enforcement, but was
ultimately deemed unintuitive and too surprising in practical use.
@stale

stale Bot commented Apr 18, 2022

Copy link
Copy Markdown

I marked this as stale due to inactivity. → More info

@stale stale Bot added the stale label Apr 18, 2022
The new syntax is

```
attrs.[ a b c ]
```

as sugar for

```
[ attrs.a attrs.b attrs.c ]
```
@stale stale Bot removed the stale label Jul 29, 2022
@stale stale Bot added the stale label May 21, 2023
@tomberek

Copy link
Copy Markdown
Contributor

stale: re-open and re-base as needed

@tomberek tomberek closed this May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants