Skip to content

Can we implement object queries without parametrizable aexprs? #2

Open
@onsetsu

Description

@onsetsu

From the paper, we originally had:

class FilterOperator {
  // ...
  onNewInstance(instance) {
    trigger(aexpr(this.expression, instance))
      .onBecomeTrue(() => this.add(instance))
      .onBecomeFalse(() => this.remove(instance));
  }
}

However, by reformulating the paramerizable aexpr to a call with that exact parameter we get:

    trigger(aexpr(() => this.expression(instance)))

Can our chosen implementation strategy handle this case?
This should be true for ticking and rewriting, but not for interpretation, if the this.expression refers to locally scoped variables, as this.expression is now not called directly in the interpreter anymore! (which it was before, so it could handle this scenario due to the explicitly provided local scope object)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions