method interceptor/sequence syntax

Jonathan Toland jonahtoland at yahoo.com
Mon Apr 21 17:23:35 PDT 2008


any consideration for an interceptor/sequence syntax?  although Function#intercept
and Function#sequence might be handy rather i would find the following
syntax quite useful:


class subcls extends supcls {
intercept function method1() {/*add'l code*/}
sequence function method2() {/*add'l code*/}
}

in lieu of:

class subcls extends supcls {
override function method1() {
super.method1();
//add'l code
}
override function method2() {
//add'l code
super.method2();
}
}

one
benefit is simply conciseness but another would prevent accidentally
calling method1 from method2 incurred by a copy/paste oversight that
the compiler might not warn against. ~ toland



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080421/a5c30daa/attachment-0002.html 


More information about the Es4-discuss mailing list