A few days ago, Brendan Eich wrote a thoughtful post on incorporating a few ideas from Python into JS 2.0 (specifically iterators, generators, and comprehensions, but that's beside the point for the moment). I replied:
t would be tremendously helpful if JS2 could standardize plugin APIs in both C and C++ (and do the latter in a template-smart way). Having simple C APIs accelerated the growth of Python and Ruby tremendously, and (I believe) is crucial to getting JS accepted as a "traditional" scripting and glue language. Standardizing "one way to do it" for C++ (esp. templated C++) would avoid a lot of the grief P&R have gone through.
Brendan's response was:
...for Mozilla, XPIDL and XPCOM (http://www.mozilla.org/scriptable/) are the way to interface to "plugins" (generally construed) implemented in other languages, not just C++ but also Python (a C XPCOM binding could be done, and one was started, but there hasn't been much interest). A truly painless C or C++ binding should work as with OCaml -- that is,
This is a fine goal, but not something for ECMA TG1 to standardize just yet. I would welcome a prototype for SpiderMonkey, if volunteers capable of pulling it off are motivated.
Plugins loaded from the net are a different animal, requiring lots of trust as well as highly compatible, stable APIs on both plugin and browser sides of the fence.