I guess you would not import/export Object, Boolean and String from a module (while Any will be exported .. uhm, feels weird) ... but for `instanceof` consistency sake I agree either constructors or lowered_cases pseudo "types"
On Wed, Aug 21, 2013 at 12:26 PM, Dmitry Lomov <[email protected]> wrote: > Hmm really? I am not sure - how this reconciles with existing Object and > String? > Even if this is imported from a module, the clashing will be unfortunate. > > Dmitry > > > On Wed, Aug 21, 2013 at 9:02 PM, David Herman <[email protected]> wrote: > >> Any, String and Object should still be uppercase. The naming convention >> is: value types lowercase, reference types uppercase. >> >> Dave >> >> On Aug 21, 2013, at 4:21 AM, Dmitry Lomov <[email protected]> wrote: >> >> > string, boolean, object and any are all lowercase (we should fix the >> wiki) >> > >> > FWIW, I am already working on a new version of polyfill. It is fully >> ES5. >> > Here is a pull request: https://github.com/dherman/structs.js/pull/12- >> > I'll merge it soon, and work more to cover everything in the proposal. >> > >> > Thanks, >> > Dmitry >> > >> > >> > >> > On Wed, Aug 21, 2013 at 3:21 AM, Andrea Giammarchi < >> [email protected]> wrote: >> > sorry, point 3 was actually the question about point 2 >> > >> > >> > On Tue, Aug 20, 2013 at 6:20 PM, Andrea Giammarchi < >> [email protected]> wrote: >> > Uhm, just a couple of extra question about that page if/when you have >> time: >> > • string and boolean are mentioned, but nowhere in your >> `struct.js` prolyfill code. Will string and boolean be accepted? >> > • `Object` and `Any` are mentioned, but exported as object and >> any in your `struct.js` prolyfill example. W >> > • Which is the right way? >> > The reason I am asking is to be able to create code that does >> absolutely nothing (for performance reason) but will look like the real >> thing so I can start experimenting with static structures and possibly a >> develop VS production version of an ES3 to ES5 compatible polyfill since I >> believe your code won't run anywhere except in SpiderMonkey (which is OK >> but it's not suitable for a lightweight migration to "structure like" logic) >> > >> > Thanks. >> > >> > >> > On Tue, Aug 20, 2013 at 4:55 PM, Andrea Giammarchi < >> [email protected]> wrote: >> > Awesome, thanks! >> > >> > >> > On Tue, Aug 20, 2013 at 4:12 PM, David Herman <[email protected]> >> wrote: >> > On Aug 20, 2013, at 1:31 PM, Andrea Giammarchi < >> [email protected]> wrote: >> > >> > > [In this page]( >> http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects), and in >> the latest meeting note too, I can read both uint8 and Uint8, as example. >> > >> > Bug. Fixed, thanks. >> > >> > > **The Question** >> > > How is `new StructType({x:Uint32, y:Uint32})` supposes to understand >> the type? `instanceof Uint32` or `typeof v === "uint32"` or ... both in >> case of `boolean` and `string` ? >> > >> > Neither. It tells you that the x and y fields have typeof 'number' and >> that their values are constrained to be integers in the range [0, 2^32). >> > >> > > A bonus question would be: does anybody know when this stuff is >> planned to go out? Not a single beta/alpha channel is exposing anything at >> all so far. >> > >> > Nikhil Marathe and Niko Matsakis are actively working on the >> implementation for SpiderMonkey: >> > >> > https://bugzilla.mozilla.org/show_bug.cgi?id=578700 >> > >> > Dmitriy Lomov is actively working on updating the prollyfill to match >> the current API: >> > >> > https://github.com/dherman/structs.js >> > https://github.com/dherman/structs.js/pull/12 >> > >> > Not sure if anyone on the V8 team (which includes Dmitriy) has started >> implementation but I believe they're interested. Right now Dmitriy is >> focused on the prollyfill and spec. >> > >> > Dave >> > >> > >> > >> > >> > >> > _______________________________________________ >> > es-discuss mailing list >> > [email protected] >> > https://mail.mozilla.org/listinfo/es-discuss >> > >> > >> >> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

