2013/10/18 Rick Waldron waldron.r...@gmail.com
@Tom - since you know the status of the more recent Proxy wiki pages
better than I do, would you mind adding the same h1 text to those that fit
the description of obsolete? Thanks!
Done!
___
es-discuss
2013/10/18 Allen Wirfs-Brock al...@wirfs-brock.com
This is what I currently have in my working draft of the ES6 spec:
[...]
In other words:
you can say:
Proxy(traget,handler)
but not
new Proxy(target, handler)
It would be easy enough to allow
new
On Oct 21, 2013, at 7:20 AM, Tom Van Cutsem wrote:
I agree with your line of reasoning and I would be happy if proxies can be
created without `new`. However, I don't see how the above spec disallows the
use of `new`. With the above definition, won't `new Proxy(target, handler)`
just
2013/10/21 Allen Wirfs-Brock al...@wirfs-brock.com
see
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-standard-built-in-ecmascript-objects
Paragraph 9:
Built-in functions that are not identified as constructors do not
implement the [[Construct]] internal method unless otherwise
Proxy.create and Proxy.createFunction are deprecated.
The correct syntax is `new Proxy(target, handler)`
In my original direct proxies proposal, the `new` was optional, so that
`var p = Proxy(target, handler)` works equally well (cf.
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Angus
Croll
I couldn't find a commitment to a specific syntax in the latest ES6 standard
It's not quite fleshed out yet, but the constructor function is at least there:
Le 18/10/2013 07:19, Angus Croll a écrit :
I couldn't find a commitment to a specific syntax in the latest ES6
standard
The latest official news is in the May 2013 TC39 notes:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-05/may-21.md#44-proxies
The final design of proxies is the
Great info thanks (and Tom and Domenic)
A note on MDN confirming that direct proxy adhered to the new spec (and a
similar one on old proxy saying it didn't) would probably be immensely helpful
to other people who had the same question I had.
Also (to all) deleting or marking as obsolete all
From: es-discuss [es-discuss-boun...@mozilla.org] on behalf of Angus Croll
[anguscr...@gmail.com
Also (to all) deleting or marking as obsolete all wiki-harmony docs that no
longer meet the standard would save a lot of wasted hours
I know Rick has already made strides in that direction via
I can confirm:
npm install harmony-reflect
node --harmony
require('harmony-reflect')
and I'm good to go with ES6 proxy syntax
thanks all!
@angustweets
On Fri, Oct 18, 2013 at 7:49 AM, Angus Croll anguscr...@gmail.com wrote:
Great info thanks (and Tom and Domenic)
A note on MDN
On Fri, Oct 18, 2013 at 10:53 AM, Domenic Denicola
dome...@domenicdenicola.com wrote:
From: es-discuss [es-discuss-boun...@mozilla.org] on behalf of Angus
Croll [anguscr...@gmail.com
Also (to all) deleting or marking as obsolete all wiki-harmony docs that
no longer meet the standard would
No worries guys - thanks for adding the 'obsolete' note
@angustweets
On Fri, Oct 18, 2013 at 8:13 AM, Rick Waldron waldron.r...@gmail.comwrote:
On Fri, Oct 18, 2013 at 10:53 AM, Domenic Denicola
dome...@domenicdenicola.com wrote:
From: es-discuss [es-discuss-boun...@mozilla.org] on
On Fri, Oct 18, 2013 at 11:19 AM, Angus Croll anguscr...@gmail.com wrote:
No worries guys - thanks for adding the 'obsolete' note
Don't hesitate to ask for clarification on this list—especially if you
think it will save you time :)
Rick
___
Follow up question for Tom et al...
Using require('harmony-reflect')
var t = {a:3, c:4};
var p = Proxy(
t,
{
get: function() {},
delete: function(t,x) {
console.log('deleting');
delete t.a;
}
}
);
delete p.c
p; //{a:3}
t; //{a:3}
the console.log is not called
Follow up question for Tom et al...
Using require('harmony-reflect')
var t = {a:3, c:4};
var p = Proxy(
t,
{
get: function() {},
delete: function(t,x) {
console.log('deleting');
delete t.a;
}
}
);
delete p.c
p; //{a:3}
t; //{a:3}
the console.log is not
thanks André that works!
(I was going by
https://github.com/tvcutsem/harmony-reflect/blob/master/doc/traps.md which
says 'delete')
@angustweets
On Fri, Oct 18, 2013 at 9:38 AM, André Bargull andre.barg...@udo.eduwrote:
Follow up question for Tom et al...
Using
On Oct 18, 2013, at 12:33 AM, Tom Van Cutsem wrote:
Proxy.create and Proxy.createFunction are deprecated.
The correct syntax is `new Proxy(target, handler)`
In my original direct proxies proposal, the `new` was optional, so that `var
p = Proxy(target, handler)` works equally well (cf.
On Friday, October 18, 2013, Angus Croll wrote:
thanks André that works!
(I was going by
https://github.com/tvcutsem/harmony-reflect/blob/master/doc/traps.mdwhich
says 'delete')
Cc Tom Van Cutsem to make sure he sees this.
Rick
@angustweets
On Fri, Oct 18, 2013 at 9:38 AM, André
I couldn't find a commitment to a specific syntax in the latest ES6
standard
Gecko, chrome experimental, traceur and 'node --harmony-proxies' support
the Proxy.create syntax (detailed in
http://wiki.ecmascript.org/doku.php?id=harmony:proxies)
e.g.
var proxy = Proxy.create({
get: function(p, n)
19 matches
Mail list logo