I wrote up a design a while back for what might be called "value proxies", which extend the Javascript proxy proposal to also trap primitive operators, enabling libraries for bignums or decimals, etc. The write-up is for an idealized 'micro-Javascript' language, but still helps clarify parts of the potential design space.
See http://www.soe.ucsc.edu/research/report?ID=1595 - Cormac On Mon, Oct 18, 2010 at 4:17 PM, Sam Ruby <ru...@intertwingly.net> wrote: > On Mon, Oct 18, 2010 at 6:57 PM, Brendan Eich <bren...@mozilla.com> wrote: >> >> You could use frozen binary data to implement the representation of a value >> type, whose operators and literal syntax would come from its object-like >> "clothing" (whether declarative via new syntax or using some Proxy-like API, >> details TBD). > > Any reason to believe that would necessarily incur significant > performance overhead? If not, that's fine with me. > > - Sam Ruby > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss