Skip to content

JEP-011 Lexical Scoping and the let() Function #24

Closed Answered by springcomp
springcomp asked this question in Q&A
Discussion options

You must be logged in to vote

Lexical Scoping

JEP 11
Author James Sayerwinnie
Created 24-Feb-2015
SemVer MINOR
[Discussion #24] #24

Abstract

This JEP proposes a new function let() (originally proposed by Michael
Dowling) that allows for evaluating an expression with an explicitly defined
lexical scope. This will require some changes to the lookup semantics in
JMESPath to introduce scoping, but provides useful functionality such as being
able to refer to elements defined outside of the current scope used to evaluate
an expression.

Motivation

As a JMESPath expression is being evaluated, the current element, which can be
explicitly referred to via the @ token, changes as expressions are
evaluated. Giv…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@springcomp
Comment options

Answer selected by springcomp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
syntax Will require grammar change function Function proposal jep-candidate JEP (Draft) available - please vote!
1 participant