James Saryerwinnie
James Saryerwinnie
Although I did notice a few interesting scenarios. First one's not so bad, but consider this: ``` >>> data = {"foo": {"bar": "baz"}} >>> jmespath.search('let({qux: `qux`}, &foo.qux)', data) 'qux' ```...
I like that better, though we still have to define where exactly these variables are valid. For instance, in my example above I had `let({foo: `foo`}, &[0].foo)`. The equivalent expression...
Not opposed to it, but my preference is to use a separate token that's not being used yet if possible.
It looks like this feature is picking up interest again, so to help move this discussion forward, here's my thoughts coming back to this after a while: I'm mostly convinced...
> Am I right thinking that in the new proposal the notion of scopes is gone ? Scopes are still there. A `$var` lookup will try to lookup the variable...
> It looks to me that we don't need to chain scopes anymore, at any point a flat binding structure would be enough. Keep in mind you can shadow variables...
> Still, I don't quite get why a flat structure can make it: Ahh, got it, you're asking about implementation details, that's what I was missing. Thought we were still...
Great idea, I should be able to automate a lot of this as well by just running the compliance tests against the libraries.
This is great! Definitely going to check this out.
That's not currently possible, but I think an interesting addition. Perhaps it's worth adding some sort of recursive flatten function? cc @mtdowling