IIya - I ran into a regarding lambda scoping in a ...
# language-proposals
b
IIya - I ran into a regarding lambda scoping in a DSL I'm working on, similar to the issue you were discussing the other day. In my use case, unintuitive things happen when the
this
from an outer scope is implicitly used in an inner-scope. I'm making a framework for defining nested validators for objects, but its basically written very similarly to the HTML Builder example.
Copy code
outer() {
    doOuterThing() // fine, implicitly the same as the following two statements
    this.doOuterThing() //fine
   this@outer.doOuterThing() // fine

   inner() {
       doInnerThing() //fine, implicitly is this@inner.doInnerThing()
       doOuterThing() // bad, because it is implicitly this@outer.doOuterThing().  Causes weird stuff to happen
  }
}