Dictionaries with no sense of self
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
I find that most of the time I'm writing jsonnet, having an object bring a magic `self` into scope is a bit of a pain. I usually end up having to define a `local realSelf = self` in the outer scope to retain the `self` that I actually wanted.
Can we have raw dictionaries with no magic `self` in scope for those times we just want to operate on a pure datastructure?
This is _almost_ the opposite of the `rec` keyword in Nix. For context, `rec` brings a dictionary's keys into scope within that dictionary, and the default is to have no access to the equivalent of `self`. I'm not proposing changing the default at this stage, but it would be nice to have a way to opt out.
cc @roconnor, since whenever I mention Nix @sparkprime cc's him anyway 😄
Contributor guide
Assessment
This issue has not been assessed yet.