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 really need to be selectable by reference, not 
by copying. If you meant b) (or something else), can you flesh it out a bit 
more?

Dave

On Oct 16, 2010, at 2:34 PM, Sam Ruby wrote:

> I'm pleased to see value_types discussed again:
> 
>  http://brendaneich.com/2010/10/should-js-have-bignums/
> 
> It is my belief that value_types[1] and struct_types[2] are sufficient to 
> build a pure ECMAScript implementation of Decimal.  Such an approach would 
> solve a number of problems:
> 
> (1) Ubiquity.  Making Decimals a required feature was controversial within 
> the committee.  Anything less would hamper adoption.  Making the 
> implementation in ECMAScript and having that implementation only depend on 
> value_types and struct_types, then the implementation effectively becomes as 
> ubiquitous as those two features.
> 
> (2) Format.  A number of committee members objected to 754R as a format.  
> Those that wish to pursue their own formats would be welcome do to so.
> 
> The only key requirement that this is not known to satisfy is:
> 
> (3) Performance.  While we were not expecting hardware level performance, 
> something approximating C-level performance was the goal.
> 
> Mitigating that is:
> 
> (3a) ECMAScript implementations have improved dramatically since this was 
> last evaluated.  The expectation is that this trend will continue. And given 
> the expected use case for struct_types, it is especially likely that that 
> feature will be implemented with performance in mind.
> 
> (3b) Not all users have the same performance requirements.
> 
> (3c) A stable implementation written in C with a liberal license[3] continues 
> to be available.  This will always be an option for enlightened browser 
> vendors with an interest in performance.
> 
> Given those mitigating factors, I am quite willing to proceed with the above 
> approach, and would strongly encourage the committee to consider adopting the 
> value_types proposal, and to not make any design decision which would 
> preclude struct_types from being considered as a value_type.
> 
> - Sam Ruby
> 
> [1] http://wiki.ecmascript.org/doku.php?id=strawman:value_types
> [2] http://wiki.ecmascript.org/doku.php?id=strawman:binary_data#structs
> [3] http://download.icu-project.org/files/decNumber/decNumber-icu-368.zip
> _______________________________________________
> 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

Reply via email to