Re: value_types + struct+types = decimal

2010-11-10 Thread Cormac Flanagan
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

Re: value_types + struct+types = decimal

2010-11-10 Thread Mark S. Miller
I just want to mention that this is an awesome paper. And I like its approach to introducing operator overloading into the language. On Wed, Nov 10, 2010 at 12:12 PM, Cormac Flanagan cor...@cs.ucsc.eduwrote: I wrote up a design a while back for what might be called value proxies, which extend

Re: value_types + struct+types = decimal

2010-10-18 Thread David Herman
Are you suggesting a) that struct types should always be value types, or b) some sort of extension to the binary data spec that allows the creation of immutable structs that are value types? I'm afraid a) just seems unworkable -- compound binary data needs to be mutable, and its sub-components

Re: value_types + struct+types = decimal

2010-10-18 Thread Brendan Eich
On Oct 18, 2010, at 3:16 PM, Sam Ruby wrote: On Mon, Oct 18, 2010 at 6:01 PM, David Herman dher...@mozilla.com wrote: Are you suggesting a) that struct types should always be value types, or b) some sort of extension to the binary data spec that allows the creation of immutable structs that

Re: value_types + struct+types = decimal

2010-10-18 Thread Sam Ruby
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