Re: Array.range() (was: Suggestion: Array.prototype.repeat)

2012-01-03 Thread Sean Eagan
/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Inherited events and receiver revival.

2011-10-17 Thread Sean Eagan
list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: holes in spread elements/arguments

2011-10-05 Thread Sean Eagan
for FormalParameterList and ArgumentList in the spec, implementations, and user's minds. I would prefer to have elision, hole preservation, and defaulting based on input array length rather than holes, but only if they were consistently applied. Thanks, Sean Eagan ___ es

Re: holes in spread elements/arguments

2011-10-05 Thread Sean Eagan
better would be let!  //...} and: f(a, , c, ...d) would desugar to: Function.prototype.apply.call(f, undefined, [a, , c, ...d]); On Wed, Oct 5, 2011 at 2:19 PM, Sean Eagan seaneag...@gmail.com wrote: On Mon, Oct 3, 2011 at 4:37 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: apply supports holes

Re: holes in spread elements/arguments

2011-10-04 Thread Sean Eagan
/mozilla/mozilla-central/js/src/jsval.h.html#l259 Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: holes in spread elements/arguments

2011-10-04 Thread Sean Eagan
On Tue, Oct 4, 2011 at 4:09 PM, Sean Eagan seaneag...@gmail.com wrote: On Mon, Oct 3, 2011 at 5:11 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: as it currently stands, a function is allowed to use both: function f(a,b,c,...rest) {    g(...arguments);    h(...rest); } Rest

argument lists as array structuring patterns and parameter lists as array destructuring patterns (Was Re: holes in spread elements/arguments)

2011-10-03 Thread Sean Eagan
as it is at the assignment boundary. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: holes in spread elements/arguments

2011-10-03 Thread Sean Eagan
the `arguments` object, so they could, and in my view, should preserve holes for both Function.prototype.apply and foo(...args) activations, at least if array structuring and destructuring preserve holes as currently specified in the ES.next draft spec. Thanks, Sean Eagan

Re: holes in spread elements/arguments

2011-10-03 Thread Sean Eagan
On Mon, Oct 3, 2011 at 11:31 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Oct 3, 2011, at 6:49 AM, Sean Eagan wrote: So I realized hole preservation is actually relevant in both array structuring and destructuring.  Array structuring and destructuring ellipses forms are both

Re: holes in spread elements/arguments

2011-10-03 Thread Sean Eagan
On Mon, Oct 3, 2011 at 11:35 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Oct 3, 2011, at 8:45 AM, Sean Eagan wrote: On Mon, Oct 3, 2011 at 10:30 AM, Erik Arvidsson erik.arvids...@gmail.com wrote: But Function.prototype.apply doesn't preserve holes. Function.prototype.apply

Re: holes in spread elements/arguments

2011-09-30 Thread Sean Eagan
since the `undefined` values don't need to be added to the rest parameter argument. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

holes in spread elements/arguments

2011-09-29 Thread Sean Eagan
element lists, by allowing them to have holes (e.g. f(1, , 3)), but it would essentially allow `undefined` arguments to be ommitted, if that would be considered useful. [1] http://wiki.ecmascript.org/doku.php?id=harmony:spread Thanks, Sean Eagan ___ es

Re: holes in spread elements/arguments

2011-09-29 Thread Sean Eagan
On Thu, Sep 29, 2011 at 1:31 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Sep 29, 2011, at 11:07 AM, Sean Eagan wrote: Sorry to drag on about array holes, but: Should holes in spread elements (e.g. [...holeyArray]) and arguments (e.g. f(...holeyArray)) reflect as holes in the array

# proposal extensions (Was: Re: Sep 26 meeting notes)

2011-09-29 Thread Sean Eagan
with |: null | ##{...} // record-esque null | ##[...] // tuple-esque Include tuple-isms for #[], ##[]: holes = syntax error length cannot be greater than 2^32 - 1 Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: # proposal extensions (Was: Re: Sep 26 meeting notes)

2011-09-29 Thread Sean Eagan
, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Uninteresting parameters

2011-09-27 Thread Sean Eagan
On Tue, Sep 27, 2011 at 2:43 PM, Brendan Eich bren...@mozilla.com wrote: On Sep 27, 2011, at 6:11 AM, Sean Eagan wrote: On Mon, Sep 26, 2011 at 4:47 PM, Xavier MONTILLET xavierm02@gmail.com wrote: Normally, you use an object for optional arguments. This is probably the most common case

Re: {Weak|}{Map|Set}

2011-09-15 Thread Sean Eagan
/be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

WeakPair primitive ?

2011-09-15 Thread Sean Eagan
(this).pairs; pairs.delete(pair); } } } Are there other useful abstractions that could be built on top of WeakPair, beyond WeakMap ? Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: An extend operator is a natural companion to |

2011-07-19 Thread Sean Eagan
productions. If we were to go that route, I would propose: // replace | with prototypes let B = A prototypes { ... }; // replace with owns let b = B owns { ... }; Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https

Re: An extend operator is a natural companion to |

2011-07-19 Thread Sean Eagan
On Tue, Jul 19, 2011 at 9:39 AM, Sean Eagan seaneag...@gmail.com wrote: // replace with owns let b = B owns { Sorry, that should have just been... B owns { ... } Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https

Re: An extend operator is a natural companion to |

2011-07-18 Thread Sean Eagan
://mail.mozilla.org/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: An extend operator is a natural companion to |

2011-07-18 Thread Sean Eagan
let b = B + {}; // adding pointed to properties. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Minor type confusion in proxies proposal?

2011-07-05 Thread Sean Eagan
. Call the [[DefineOwnProperty]] internal method of O with arguments name, desc, and true. 6. Return O. Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony proxies] Non-configurable properties: fixed properties VS trap all with invariants enforcement

2011-07-05 Thread Sean Eagan
I like the FixedHandler approach, one remaining concern I have though is that without something like Proxy.isProxy, object consumers will need to unnecessarily wrap non-proxy objects in order to guarantee invariant maintenance. Cheers, Sean Eagan ___ es

Re: prototype focus

2011-07-01 Thread Sean Eagan
be provided: constructor(... args) { super(... args); } Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: prototype focus

2011-07-01 Thread Sean Eagan
to a default constructor not to be forwarded to the superclass constructor. Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Making super work outside a literal?

2011-06-23 Thread Sean Eagan
, and they benefit from the full dynamic super semantics! I'm sure there are still details to work out, but it seems quite promising to me. Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Making super work outside a literal?

2011-06-23 Thread Sean Eagan
A couple corrections below: On Thu, Jun 23, 2011 at 9:14 AM, Sean Eagan seaneag...@gmail.com wrote: When a super delegate function is subsequently accessed from an object, e.g. o.methodThatUsesSuper or Object.getOwnPropertyDescriptor(o, accessorWithGetterOrSetterThatUsesSuper), this resolves

Re: Making super work outside a literal?

2011-06-23 Thread Sean Eagan
may still require a defineSuperProperty proxy trap, not sure. Also, I wonder if there is a need for a Function.prototype.isSuper similar to Function.prototype.isGenerator? On Thu, Jun 23, 2011 at 10:51 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Jun 23, 2011, at 3:14 PM, Sean Eagan wrote

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
|this|. /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
: getterThatReturnsMethodThatUsesSuper})|. Allen ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
On Wed, Jun 22, 2011 at 9:23 AM, Axel Rauschmayer a...@rauschma.de wrote: From: Sean Eagan seaneag...@gmail.com Date: June 22, 2011 15:48:18 GMT+02:00 There is no infinite recursion hazard in the semantics that Axel suggested, and that I used in the gist I posted (https://gist.github.com

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
On Wed, Jun 22, 2011 at 10:01 AM, Brendan Eich bren...@mozilla.com wrote: On Jun 22, 2011, at 6:48 AM, Sean Eagan wrote: I don't think we need any safety check when assigning a method or accessor getter or setter that uses super to an object.  The concept of super seems to be a relative one

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
too much. Its value is already resolved via prototype climbing, I don't see the tremendous cost is simply making this value accessible within the function activation which occurs as a result of the prototype climbing. /be Cheers, Sean Eagan ___ es

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
because |super| uses it's sibling |this| as the |this| in methods and accessor getter and setter calls that result from |super| property access. If by self you mean the same thing as Axel's here, then I don't think that is desireable as Brendan earlier pointed out. Peter Cheers, Sean Eagan

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
is as well with the combination of object literal super and Object.defineMethod. Sorry for any earlier rehashing, I didn't realize we agreed on those points. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org

Re: Making super work outside a literal?

2011-06-22 Thread Sean Eagan
On Wed, Jun 22, 2011 at 2:11 PM, Brendan Eich bren...@mozilla.com wrote: On Jun 22, 2011, at 11:01 AM, Sean Eagan wrote: On Wed, Jun 22, 2011 at 12:07 PM, Juan Ignacio Dopazo dopazo.j...@gmail.com wrote: Can the value of a dynamic super be unambiguously resolved with prototype climbing

Re: Making super work outside a literal?

2011-06-21 Thread Sean Eagan
://mail.mozilla.org/listinfo/es-discuss Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Making super work outside a literal?

2011-06-21 Thread Sean Eagan
-- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Making super work outside a literal?

2011-06-20 Thread Sean Eagan
list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Proposal: Property fixing

2011-06-16 Thread Sean Eagan
compensation code), I think. David ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https

Re: [Harmony Proxies] Proposal: Property fixing

2011-06-16 Thread Sean Eagan
Sorry, I meant remove the configurability check of the getOwnPropertyDescriptor and getPropertyDescriptor trap return values, and add a check as to whether the defineProperty trap return value is an object to fix the property to. On Thu, Jun 16, 2011 at 8:12 AM, Sean Eagan seaneag...@gmail.com

Re: [Harmony Proxies] Proposal: Property fixing

2011-06-16 Thread Sean Eagan
to indicate that the object cannot be made non-extensible / sealed / frozen. On Thu, Jun 16, 2011 at 8:15 AM, Sean Eagan seaneag...@gmail.com wrote: Sorry, I meant remove the configurability check of the getOwnPropertyDescriptor and getPropertyDescriptor trap return values, and add a check

Re: [Harmony Proxies] Proposal: Property fixing

2011-06-14 Thread Sean Eagan
. Cheers, Tom 2011/5/4 Sean Eagan seaneag...@gmail.com What: Honor attempts to make individual proxy properties non-configurable. Why: For consistency since attempts to make *all* of a proxy's properties non-configurable are honored via the fix trap. Example: var x = Proxy.create

[Arrow function syntax] Move Arrow to head to fix ArrowFormalParameters issues

2011-06-01 Thread Sean Eagan
: ( FormalParameterListOpt ) FormalParameterList : ... this InitialiserOpt this InitialiserOpt , FormalParameterList [1] http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax Thanks, Sean Eagan ___ es-discuss mailing list es

Re: [Arrow function syntax] Move Arrow to head to fix ArrowFormalParameters issues

2011-06-01 Thread Sean Eagan
)); or possibly higher(-@ fact (n) n=1?1:n*fact(n-1)); (in either case the 3 character arrow sequence would be one token) Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

[Harmony Proxies] Default trap implementations should be non-normative

2011-05-31 Thread Sean Eagan
://wiki.ecmascript.org/doku.php?id=harmony:proxies_semantics Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Default trap implementations should be non-normative

2011-05-31 Thread Sean Eagan
On Tue, May 31, 2011 at 12:04 PM, Sean Eagan seaneag...@gmail.com wrote: 1.  If O does not have a [[Handler]] internal property return [false]. 2.  Let handler be the value of the [[Handler]] internal property of O. 3.  Let trap be the result of calling the [[Get]] internal method of handler

Re: [Harmony Proxies] Default trap implementations should be non-normative

2011-05-31 Thread Sean Eagan
is true, and whose second element is the result of calling the [[Call]] internal method of trap providing handler as the this value and Arguments appended with O as the arguments. On Tue, May 31, 2011 at 12:08 PM, Sean Eagan seaneag...@gmail.com wrote: On Tue, May 31, 2011 at 12:04 PM, Sean Eagan

Re: Proposal: Object.defineProperty shorthand

2011-05-31 Thread Sean Eagan
to be single characters for each attribute, if you use the full names you are hardly gaining enough conciseness to make it worthwhile. On Thu, May 26, 2011 at 6:24 PM, Sean Eagan seaneag...@gmail.com wrote: On Thu, May 26, 2011 at 4:27 PM, Sean Eagan seaneag...@gmail.com wrote: Something similar could

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
? /be ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
On Fri, May 27, 2011 at 10:10 AM, Sean Eagan seaneag...@gmail.com wrote: I think the separation between proxies and regular objects is too much.  I would prefer to think of proxies as just a special kind of object.  All objects could be thought of as having a handler ( [[Handler]] ), and proxy

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
if the implementation allows property access watching, no such notifications would be sent for property access on builtins that occur within the default trap's code. On Fri, May 27, 2011 at 11:12 AM, Brendan Eich bren...@mozilla.com wrote: On May 27, 2011, at 8:10 AM, Sean Eagan wrote: I think the separation

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
On Fri, May 27, 2011 at 12:18 PM, Sean Eagan seaneag...@gmail.com wrote: Thanks, I wasn't aware of that history. I'm not suggesting that default handlers or traps even should exist from an implementation perspective, just that they could be a nice specification mechanism now that we have

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
On Fri, May 27, 2011 at 12:43 PM, Sean Eagan seaneag...@gmail.com wrote: Of course you could go the other way, and remove the default trap implementations.  All objects could have the same internal method implementation regardless of whether or not they are a proxy.  Within each internal

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
On Fri, May 27, 2011 at 1:05 PM, Sean Eagan seaneag...@gmail.com wrote: On Fri, May 27, 2011 at 12:43 PM, Sean Eagan seaneag...@gmail.com wrote: Of course you could go the other way, and remove the default trap implementations.  All objects could have the same internal method implementation

Re: Converting an existing object to a proxy

2011-05-27 Thread Sean Eagan
On Fri, May 27, 2011 at 1:05 PM, Sean Eagan seaneag...@gmail.com wrote: On Fri, May 27, 2011 at 12:43 PM, Sean Eagan seaneag...@gmail.com wrote: Of course you could go the other way, and remove the default trap implementations.  All objects could have the same internal method implementation

Re: Proposal: Object.defineProperty shorthand

2011-05-27 Thread Sean Eagan
, May 26, 2011 at 11:54 AM, Sean Eagan seaneag...@gmail.com wrote: On Thu, May 26, 2011 at 1:43 PM, Mike Shaver mike.sha...@gmail.com wrote: On Thu, May 26, 2011 at 11:37 AM, Sean Eagan seaneag...@gmail.com wrote: // ! implies non-writable, ~ implies non-enumerable // all assignment operators can

Re: May the defineProperty method of a proxy handler throw a TypeError?

2011-05-26 Thread Sean Eagan
-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 -- Sean Eagan ___ es-discuss mailing list

Proposal: Object.defineProperty shorthand

2011-05-26 Thread Sean Eagan
.html Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: Object.defineProperty shorthand

2011-05-26 Thread Sean Eagan
On Thu, May 26, 2011 at 1:43 PM, Mike Shaver mike.sha...@gmail.com wrote: On Thu, May 26, 2011 at 11:37 AM, Sean Eagan seaneag...@gmail.com wrote: // ! implies non-writable, ~ implies non-enumerable // all assignment operators can be used ! a.b += c Legal parse today, though I'm not sure you

Re: Proposal: Object.defineProperty shorthand

2011-05-26 Thread Sean Eagan
On Thu, May 26, 2011 at 1:54 PM, Sean Eagan seaneag...@gmail.com wrote: PostfixExpression:  BasicLeftHandSideExpression Sorry, I meant: PostfixExpression : BasicLeftHandSideExpression BasicLeftHandSideExpression [no LineTerminator here] ++ BasicLeftHandSideExpression [no LineTerminator

Re: Proposal: Object.defineProperty shorthand

2011-05-26 Thread Sean Eagan
: false}; var x = nonExtensibleP @ { x: x } Something similar could work for properties, need to think about it. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: Object.defineProperty shorthand

2011-05-26 Thread Sean Eagan
On Thu, May 26, 2011 at 4:27 PM, Sean Eagan seaneag...@gmail.com wrote: Something similar could work for properties, need to think about it. Here's a start: // reusable descriptor var allFalse = {configurable: false, writable: false, enumerable: false}; var foo = { {configurable: false

Re: Proposal: Concise instance initialisation

2011-05-24 Thread Sean Eagan
=harmony:destructuring Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: Concise instance initialisation

2011-05-24 Thread Sean Eagan
On Tue, May 24, 2011 at 9:02 AM, Sean Eagan seaneag...@gmail.com wrote: // - function A (){  var a = arguments[0];  Object.defineProperty(this, b, {configurable: false, enumerable: false, writable: true, arguments[1]})  Object.defineProperty(this, c, {configurable: true, enumerable: true

Re: Proposal: Concise instance initialisation

2011-05-24 Thread Sean Eagan
On Tue, May 24, 2011 at 9:10 AM, Brendan Eich bren...@mozilla.com wrote: On May 24, 2011, at 7:02 AM, Sean Eagan wrote: This conflicts with the existing: var foo = bar; {foo}  // bar {!foo} // false No, just because |{!b}| is current syntax, doesn't mean that |var a = {!b}| is. I've

Re: Proposal: Concise instance initialisation

2011-05-23 Thread Sean Eagan
. -Message d'origine- From: Sean Eagan Sent: Saturday, May 21, 2011 10:10 AM To: es-discuss Subject: Proposal: Concise instance initialisation Summary: Update Object Literal Extensions [1] to integrate with constructor parameters for concise instance initialization. Details

Proposal: Concise instance initialisation

2011-05-21 Thread Sean Eagan
, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal: Concise class property definition

2011-05-21 Thread Sean Eagan
, Sean Eagan wrote: The basic idea is to integrate concise object literal extensions [1] into classes with trait composition [2].  Here's an initial attempt at the resulting syntax: I've update [1] and integrated with some related proposals to make the integrated proposal tree starting

Proposal: Concise class property definition

2011-05-20 Thread Sean Eagan
=strawman:concise_object_literal_extensions [2] http://wiki.ecmascript.org/doku.php?id=strawman:classes_with_trait_composition Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: prototype for operator proposal for review

2011-05-20 Thread Sean Eagan
, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Proposal: Property fixing

2011-05-10 Thread Sean Eagan
to a falsey defineProperty trap invocation return value. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Proposal: Property fixing

2011-05-10 Thread Sean Eagan
consumers. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Proposal: Property fixing

2011-05-05 Thread Sean Eagan
... // non-writable, but set trap still called x.foo = baz; Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] Proposal: Property fixing

2011-05-05 Thread Sean Eagan
... Proxy.isProxy = function(objectOrProxy) { let unlikelyPropertyName = _@_*__%_+_!_; Object.defineProperty(objectOrProxy, unlikelyPropertyName, {}); return Object.getOwnPropertyDescriptor(objectOrProxy, unlikelyPropertyName).configurable; } Thanks, Sean Eagan

[Harmony Proxies] Proposal: Property fixing

2011-05-04 Thread Sean Eagan
, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

[Harmony Proxies] get/set trap receiver argument unnecessary

2011-04-27 Thread Sean Eagan
8.12.5 step 4 also calls [[GetProperty]] on the receiver, causing a [[GetProperty]] (not [[Put]]) call to propogate up the prototype chain, meaning the proxy's getPropertyDescriptor (not set) trap is called. Thanks, Sean Eagan ___ es-discuss mailing list es

Re: [Harmony Proxies] get/set trap receiver argument unnecessary

2011-04-27 Thread Sean Eagan
in a prototype chain, its set trap should not be called, but again its getPropertyDescriptor trap. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] get/set trap receiver argument unnecessary

2011-04-27 Thread Sean Eagan
This can also be seen by realizing that if proxyA's handler uses the default get and set trap implementations, and proxyB is proxyA's [[Prototype]], then proxyB's get and set traps will not be called due to property access on proxyA, but rather its getPropertyDescriptor trap. Thanks, Sean Eagan

Re: [Harmony Proxies] get/set trap receiver argument unnecessary

2011-04-27 Thread Sean Eagan
Sorry, ignore the first paragraph in my last post, I included it at the end instead. Thanks. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: [Harmony Proxies] get/set trap receiver argument unnecessary

2011-04-27 Thread Sean Eagan
or ES5 section 8.12.5 step 5.b for a setter. The proxy's get / set trap would not get called, and thus would not need the receiver arguments. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Shared proxy handlers

2011-04-19 Thread Sean Eagan
handler = new Proxy.ForwardingHandler; // customize |handler| as desired here return new (Proxy.Constructor(handler))(...createArgs); })(); Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es

Re: Shared proxy handlers

2011-04-18 Thread Sean Eagan
Proxy.Handler, handler-per-instance use cases could be accommodated simply by wrapping a singleton pattern around a handler. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Shared proxy handlers

2011-04-14 Thread Sean Eagan
prematurely before state is initialized. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Uniform proxy API via caching call and construct traps

2011-04-13 Thread Sean Eagan
of the issues I've seen mentioned. There is a precedent for this in that a constructor's prototype property is cached in the internal [[Prototype]] property of objects it constructs during the call to [[Construct]]. [1] http://wiki.ecmascript.org/doku.php?id=strawman:uniform_proxies Thanks, Sean Eagan

Shared proxy handlers

2011-04-13 Thread Sean Eagan
ForwardingProxy = Proxy.Constructor(Proxy.Handler); let proxy = new ForwardingProxy(target); Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Parameter lists as arguments destructuring sugar

2011-04-09 Thread Sean Eagan
has an example of it, but it's not fully specified), then you could just do this... function ({a, b}){} //or function ({a: b, c: d}){} Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Parameter lists as arguments destructuring sugar

2011-04-08 Thread Sean Eagan
://wiki.ecmascript.org/doku.php?id=harmony:parameter_default_values [3] http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters [4] http://wiki.ecmascript.org/doku.php?id=strawman:shorter_function_syntax Thanks, Sean Eagan ___ es-discuss mailing list es-discuss

Re: Parameter lists as arguments destructuring sugar

2011-04-06 Thread Sean Eagan
= (__ThisBindingIsExplicit__ ? __ThisBinding__ : defaultThis), + __parameterList__] = __arguments__; //... ); Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Parameter lists as arguments destructuring sugar

2011-04-06 Thread Sean Eagan
+ ] = __arguments__; //... ); I'll be quiet now. Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Early spread operator

2011-04-05 Thread Sean Eagan
stretching too much... let Pizza = function(...toppings = [pepperoni]) { this.toppings = toppings; } let pepperoni = new Pizza(), hawaiin = new Pizza(pineapple, ham); Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https

Parameter lists as arguments destructuring sugar

2011-04-04 Thread Sean Eagan
/013528.html Cheers, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Early spread operator

2011-04-01 Thread Sean Eagan
, ...variableLength, last] = arr; [interesting, ...notInteresting, alsoInteresting] = arr; [interesting, ..., alsoInteresting] = arr; Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Early spread operator

2011-04-01 Thread Sean Eagan
, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Early spread operator

2011-04-01 Thread Sean Eagan
Whoops, first code block should have been... let restDefaults = [2, 3]; let f = function(first, ...rest = restDefaults){} f(1) // first - 1, rest - restDefaults f(1, 2) // first - 1, rest - [2] Thanks, Sean Eagan ___ es-discuss mailing list es-discuss

Re: Early spread operator

2011-04-01 Thread Sean Eagan
? Thanks, Sean Eagan ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss