Skip to content

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

Draft
r-burns wants to merge 5 commits intoNixOS:masterfrom
r-burns:rfc-110-inherit-as-list-mvp
Draft

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

Conversation

@r-burns
Copy link
Contributor

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

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
Copy link

stale bot commented Apr 18, 2022

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
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.

1 participant

Comments