metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ottobackwards <>
Subject [GitHub] metron issue #687: METRON-1090 Add Assignment to Stellar Language
Date Thu, 18 Jan 2018 20:08:11 GMT
Github user ottobackwards commented on the issue:
    The others can comment, but I think proper scope would be implemented within the execution
of the call stack, not arbitrarily by the resolvers.  Each resolver should be a 'scope' and
new scopes should be created.  
    A.  Because it is a resolver thing, where would you document it in a way that makes sense?
 I have been thinking that we should refactor to explicitly support scoping in the processor/evaluations
and then have the resolvers _used_ in scope as scope implementations.  So the nesting of scopes
would not be done in the resolver.
    B.  As noted in the PR description, I was hoping for discussion ( THIS discussion as a
matter of fact ).  Having had some issues with my other PRs and scope, I chose to explicitly
NOT go that far until we talked it through.  I did not feel all the way back then that I had
enough of a grasp of the different resolvers to change their behavior and understand the consequences
either way.
    C.  The LambaExpression actually delegates to the state variable resolver:
      VariableResolver variableResolver = new DefaultVariableResolver(
            variable -> lambdaVariables.getOrDefault(variable
                , state.variableResolver.resolve(variable)
            ), variable -> true,
            (variable, value) -> {
              if (state.variableResolver.exists(variable)) {
                state.variableResolver.update(variable, value);
    - I think I answered above. 
    - I *think* so, maybe @cestella  or @nickwallen  can answer that
    - Again, I stopped short until I got some kind of feedback.
    - I have changed StellarAssignment, I don't think we need both `=` and `:=`, and if there
are `:=` floating around they will work, unless we remove StellarAssignment


View raw message