value_types + struct+types = decimal

Cormac Flanagan cormac at cs.ucsc.edu
Wed Nov 10 12:12:26 PST 2010


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 <rubys at intertwingly.net> wrote:
> On Mon, Oct 18, 2010 at 6:57 PM, Brendan Eich <brendan at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list