-
-
Notifications
You must be signed in to change notification settings - Fork 160
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 0120] Discourage nested with
expressions
#120
base: master
Are you sure you want to change the base?
Conversation
with
expressions
Related: #110 |
For the record let me explain what @L-as means by noting # Basic usecase:
meta = {
inherit homepage; # inherit in attribute set
license = with licenses; [ inherit (lib.licenses) mit ]; # inherit in list
}
# Not so obvious syntax
let inherit (lib) mapAttrs filterAttrs; in {
a = mapAttrs (a: b: xyz) abc;
b = filterAttrs (it: xyz) abc;
} |
This RFC is now again open for nominations :) |
This RFC has not gotten any nominations which appears to show lack of interest from the community. In order to drive this RFC forward I recommend trying to help find shepherds by reaching out to people you know and posting in discourse or Matrix. If no shepherds can be found we will convert this RFC to draft to be on hold until we can find enough interested participants. |
To re-iterate the previous comment, this RFC will require some shepherds in the next two weeks otherwise will be turned into a draft awaiting further interest. |
Rendered
This has come up while trying to implement alternative interpreters/evaluators for the Nix language, and similar tools which need to perform static analysis on Nix expressions.
This idea is a compromise. The original idea was to forbid
with
expressions completely, which proved to be undesirable and impratical. A related idea was the introduction of awith-only
expression, but it (1) wouldn't completely solve the problem and (2) introduce another keyword with no apparent immediate benefit.This issue was discussed quite a few times on various channels, and this is an attempt to move closer to a solution.
cc @sternenseemann