Re: Typed properties beside Typed Objects

2014-03-11 Thread Andrea Giammarchi
Last thing, for backward compatible it means that these properties will work regardless in ES5 and ES6 but without guarded types ... guard that has been already implemented by my shim/experiment with these kind of descriptors. It's like adding `withCredentials` to XHR when it won't affect older im

Re: Typed properties beside Typed Objects

2014-03-11 Thread Andrea Giammarchi
Here an example based on partially typed prototype generating normal dynamic instances with typed properties. ```javascript var int32 = 0, string = ''; function UniqueIDGenerator(prefix, suffix) { this.i = 0; this.prefix = prefix || ''; this.suffix = suffix || ''; } Object.definePropertie

Re: Typed properties beside Typed Objects

2014-03-11 Thread Brendan Eich
Andrea Giammarchi wrote: **Backward Compatible** Having an implicit default to `Any` means that this `type` descriptor property could be simply ignored or implemented as _always Any_ in ES5 or ES6 compatible engines but a simple library that wraps `Object.create`, Still not making sense. I

Typed properties beside Typed Objects

2014-03-11 Thread Andrea Giammarchi
Opening a new thread since the topic chosen for the enriched descriptors was misleading and I didn't manage to explain what I was trying to achieve. **Typed Objects** Using `StructType`, as [described here]( http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects) we can define static "classe