Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

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