I understand open recursion as the process of a method on a class calling another method on a class using a keyword such as this, but whereby the method call may actually be bound to a sub class at run time.Is this a fair demonstration of open recursion?class Sup {    go() {        alert('sup');    }    callGo() {        this.go();    }}class Sub extends Sup {    go() {        alert('sub');    }}var sub = new Sub();sub.callGo();
Is this a good example of open recursion?
recursion
No, in this case Sub will simply override Sup.go() and so only Sub.go() is executed.Open recursion is when a method in a class can call itself (i.e. its own signature) which is recursion, but due to dynamic dispatch (can) actually call a subclass, which is open recursion:class A {    protected int counter = 1;    public void loop() {        System.out.println(Looping  + counter +  times);        counter++;        this.loop();    }}class B extends A {    @Override    public void loop() {        if(counter == 1) {             super.loop();        }    }}Now new A().loop() will loop indefinitly*, but new B().loop() will terminate.* It will actually cause a stack overflow unless you have an inifinite stack or tail-call optimization