Proxy questions

Kevin Smith khs4473 at
Sun Jan 20 10:49:11 PST 2013

> Does the stack unwind as with normal error handling?  Does "after bar" get
>> logged?  (FF18 answers yes to the first and no to the second question.)
> I agree with FF18 here.

OK.  Consider this:

class Purse {

    private balance;

    constructor() {
        balance = 0;

    getBalance() { return balance; }

    somethingInocuous() {}

    deposit(amount, srcPurse) {
        private(srcPurse).balance -= amount;
        balance += amount;

A proxy for a Purse instance could throw on access to "somethingInocuous",
leaving the high-integrity object in an inconsistent state.  It would seem
that a high-integrity object would need to assume that any access to a
public property might throw, in case the object is being proxied.

Am I thinking about this correctly?

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list