That's a very interesting point.
But there is indeed a subtle difference between call/construct traps and
the rest of the handler. These traps are actually more of the "internal
property setting" kinds (like the prototype argument in Proxy.create). I
think that it is the reason why these things are
@Brendan My mistake was thinking that setting enumerable to false also made
it return false on hasOwnProperty().
The idea behind it was to be able to walk down the prototype chain by doing
o.constructor.prototype.contructor.proto... But then I realized that's not
the case even in today's javascrip
On Mar 12, 2011, at 6:05 PM, Juan Ignacio Dopazo wrote:
> Right, my bad then.
Maybe not, it's a difference but possibly someone will make the case for it. I
still favor putting 'constructor' on the class prototype (constructor function
.prototype in plain old ES5). It is more efficient and usua
> Allen Wirfs-Brock worte:
>
> I've updated all of the Harmony extended object literal proposals
> http://wiki.ecmascript.org/doku.php?id=strawman:object_initialiser_extensions
> based upon discussions at the last several TC39 meetings.
> ...
> These items are on the agenda for the next TC39 m
On Mar 13, 2011, at 3:58 PM, Charles Kendrick wrote:
> Brendan, Bradley and others - there's no need to search for a relatively
> uncommon use case for ordered maps indexed by keys - a far more common use
> case is enumerated data stored numerically, eg, marital status:
>
> {
> 2: "Married",
On Mar 13, 2011, at 3:42 PM, David Bruant wrote:
> I personnally don't have any strong conviction on the matter (which object
> should carry the function if any). But as I wanted to get rid of a part of
> the terminology that had been used in a method name
> (http://wiki.ecmascript.org/doku.php
Brendan, Bradley and others - there's no need to search for a relatively
uncommon use case for ordered maps indexed by keys - a far more common use case
is enumerated data stored numerically, eg, marital status:
{
2: "Married",
1: "Single",
5: "Divorced"
}
Likewise maps from numeric pr
On Mar 13, 2011, at 4:57 AM, Claus Reinke wrote:
> The little "issue" I see in returning 1) index properties in ascending
> order 2) all other properties in addition order is that there is a bit
> of information lost in the process: overall property addition order
> (index properti
There is a little twist to this. You can create a proxy that has separate
implementations of [[Call]] and [[Construct]], and by fixing it, it converts to
a regular functions. However, this "regular" function is different from any
other non-host function: it behaves different w.r.t. to f() and n
I personnally don't have any strong conviction on the matter (which
object should carry the function if any). But as I wanted to get rid of
a part of the terminology that had been used in a method name
(http://wiki.ecmascript.org/doku.php?id=harmony:proxies#detecting_proxy_objects)
I just thought i
Hi Dmitry,
It looks to me like you've just found a bug in SpiderMonkey's generator
implementation, which pre-dates the strawman:generators proposal by four+
years. Please file it in the right place: https://bugzilla.mozilla.org/. Thanks.
The bug is a regression. Here's what my Firefox 3-era JS
I buy it.
I also cringe a little at Array.isArray, and therefore at Proxy.isProxy, in the
pre-modules world ES5 and the proxies proposal inhabit. These seem like
tautological predicates, and Object.isArray is prettier and more fitting in my
view. But this is a tiny nit to pick. If you buy it, t
A couple of quick notes:
- I just updated http://wiki.ecmascript.org/doku.php?id=strawman:enumeration to
cite this thread by linking to the head message from Charles. Good feedback
here, we on TC39 are processing it and we'll talk about it at the meeting in
two weeks.
- Dave Herman just wrote
Hello,
I hope you can help with explaining of what is going on with `this`
value inside the body of a generator?
Consider e.g. the following case:
// infinite objects generator
let g = new function () {
this.x = 10;
while (true) {
yield;
}
};
// generate an array of 3 objects
let o
Hi,
I would like to discuss the terminology of the proposal and the two
states of a proxy: trapping or fixed.
In order to discuss, here is a little example:
-
var o = {};
var p = Proxy.create( forwardingHandler(o) );
p.a = 1;
o.b = 2;
p.c = 3;
o.d = 4;
/* For all x
On Sun, Mar 13, 2011 at 5:57 AM, Claus Reinke wrote:
> Please note that this use case highlights the highjacking of numeric
Strings as indices, not the lack of overall property addition order
> including indices.
>
> A spec workaround would be to stop converting numeric keys to
> Strings, ie, 1 a
Le 13/03/2011 10:57, Claus Reinke a écrit :
> The little "issue" I see in returning 1) index properties in
> ascending
> order 2) all other properties in addition order is that there is a
> bit
> of information lost in the process: overall property addition order
> (index pr
The little "issue" I see in returning 1) index properties in ascending
order 2) all other properties in addition order is that there is a bit
of information lost in the process: overall property addition order
(index properties included).
..
Music album in which one title is a number. I lose the
18 matches
Mail list logo