> Can you show an example (and also the same example which is solved by 
> es-proposed super-calls)? 


let A = {
    describe() {
        return "A";
    }
}
let B = A <| {
    describe() {
        return "B"+super.describe();
    }
}
let C = B <| {
    describe() {
        return "C"+super.describe();
    }
}
let obj = C <| {};

Invocation: B.describe.call(obj) should return "BA". With your library I would 
expect it to return "BBA".

Furthermore, I don’t think your approach would work here:

let A = {
    one() {
        return this.two();
    }
    two() {
        return "a";
    }
}
let B = A <| {
    one() {
        return "B"+super.one();
    }
    two() {
        return "b"+super.two();
    }
}
let C = B <| {
    one() {
        return "C"+super.one();
    }
    one() {
        return "b"+super.two();
    }
}
let obj = C <| {};

Would obj.one() work? As far as I can tell, your bookkeeping works for one 
super recursion only, not for two.

-- 
Dr. Axel Rauschmayer
a...@rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to