2 years ago
2 years ago


(Reporter: flurpdadurp, Unassigned)





2 years ago
Could a group of pages be created for the API just implemented into Firefox 54 Nightly, TypedObjects?

TypedObjects pretty much allow static typing in JavaScript, with the addition of structs and other things.

Here are the properties of TypedObject -

    * Any: Reference
    * ArrayType: ArrayType()
    * Object: Reference
    * StructType: StructType()
    * float32: Scalar
    * float64: Scalar
    * int16: Scalar
    * int32: Scalar
    * int8: Scalar
    * objectType: objectType()
    * storage: storage()
    * string: Reference
    * uint16: Scalar
    * uint32: Scalar
    * uint8: Scalar
    * uint8Clamped: Scalar

It looks like Scalar is just a regular JavaScript number, however I don't know what storage, objectType, and Reference are. Nothing about those three things are mentioned in the spec, so maybe they're new as well. The name 'Reference' makes me think pointers, but that seems a little too low-level for JavaScript, especially since we now have WebAssembly.

Here is the proposal Mozilla links to when it mentions TypedObjects in its changelog -

This whole thing looks incredible, so I hope the page is considered being added!

Thank you!

The TypedObject proposal predates ES2015 and the yearly release model ECMAScript is on now. That said, the Firefox experimental implementation is not based on current standards work. I'm not sure how useful it is to further advertise or to document it in this case. CC'ing JS engine people who might know better.
IMO it's premature to document TypedObjects.  I think TypedObjects are coming back, but initially to support WebAssembly's interaction with JS, and I would expect the TypedObjects' form to be slightly different from what we have now, more suited to that purpose.
I agree. We will document what will be on a standards track. I think this premature API could be removed from SpiderMonkey at some point, too.
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.