Re: Approx-equal operator

2011-12-19 Thread Dmitry Soshnikov
On 19.12.2011 2:26, Mike Samuel wrote: 2011/12/18 Dmitry Soshnikovdmitry.soshni...@gmail.com: On 18.12.2011 23:18, Mike Samuel wrote: 2011/12/17 Dmitry Soshnikovdmitry.soshni...@gmail.com: Hi, Just recently was working with Ruby's code. And found useful again its (actually from Perl)

Re: Approx-equal operator

2011-12-19 Thread Jorge
On 19/12/2011, at 10:10, Dmitry Soshnikov wrote: Have we already planned paren-free calls? Seems I missed approved strawman. Only for block lambdas, if I'm not mistaken: https://mail.mozilla.org/pipermail/es-discuss/2011-May/014595.html quote 3) Should paren free calls be introduced? I'm

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
With the new direct proxies API, there is potentially another solution to combining proxies with private names: private name property get/set could bypass the proxy entirely and be forwarded unconditionally to the target, just like |typeof|, |Object.getPrototypeOf| and [[Class]]. Pro: - no

Versioning?

2011-12-19 Thread Peter van der Zee
https://lists.webkit.org/pipermail/webkit-dev/2011-December/018924.html ``use version 6;`` In which thread on esdiscuss should I have read about that? - peter ___ es-discuss mailing list es-discuss@mozilla.org

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Herby Vojčík
Hello, I see error here. Unless I misunderstood something, in present state it so that: var n = Name(); proxy[n] // triggers handler.get(target, n.public); proxy[n.public] // triggers handler.get(target, ToString(n.public)); and n.public is object, not string. So get handler can easily

Re: Approx-equal operator

2011-12-19 Thread Dmitry Soshnikov
Thanks Jorge, yes, similarly this conclusion was in my memory too. Dmitry. On 19.12.2011 13:53, Jorge wrote: On 19/12/2011, at 10:10, Dmitry Soshnikov wrote: Have we already planned paren-free calls? Seems I missed approved strawman. Only for block lambdas, if I'm not mistaken:

Re: Math: n-th root, logarithm with arbitrary base

2011-12-19 Thread Axel Rauschmayer
But wouldn’t that rather be a reason for making these functions part of the core language? On Dec 19, 2011, at 8:48 , Erik Corry wrote: Both the proposed implementations do fp rounding twice, and so produce an inaccurate answer. I think we should probably leave it to the user to define

Re: Versioning?

2011-12-19 Thread David Bruant
I did start a related thread a while ago [1]. Brendan's response [2] explained a few things: Please read RFC 4329: http://tools.ietf.org/html/rfc4329 There will be *at least* a ;version=6 parameter you can use, probably with either application/javascript and application/ecmascript -- I have

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
2011/12/19 Herby Vojčík he...@mailbox.sk Hello, I see error here. Unless I misunderstood something, in present state it so that: var n = Name(); proxy[n] // triggers handler.get(target, n.public); proxy[n.public] // triggers handler.get(target, ToString(n.public)); and n.public is

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread David Bruant
Le 19/12/2011 11:03, Tom Van Cutsem a écrit : With the new direct proxies API, there is potentially another solution to combining proxies with private names: private name property get/set could bypass the proxy entirely and be forwarded unconditionally to the target, just like |typeof|,

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread David Bruant
Le 19/12/2011 11:03, Tom Van Cutsem a écrit : (...) Separate getPrivate/setPrivate traps would avoid this confusion: (...) One thing that is unsaid in the current proposal is whether private names can be used with Object.defineProperty and Object.getOwnPropertyDescriptor. I think that private

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
2011/12/19 Tom Van Cutsem tomvc...@gmail.com Calling the trap and catching a special exception is something that we have avoided in the proxy design thus far. One possibility is to have the getPrivate trap return a boolean. If the trap returns false, the proxy will forward the private name

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
2011/12/19 David Bruant bruan...@gmail.com The public part is an unforgeable object (with the same .toString than the private name), so there is no ambiguity in a public-private map. You use the unforgeable public object as key in the map, so no collision issue due to string forgeability.

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
2011/12/19 David Bruant bruan...@gmail.com Le 19/12/2011 11:03, Tom Van Cutsem a écrit : (...) Separate getPrivate/setPrivate traps would avoid this confusion: (...) One thing that is unsaid in the current proposal is whether private names can be used with Object.defineProperty and

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Herby Vojčík
Hello, I'd say this is not specialty of get trap. If you don’t know the private name itself (and the scenario where you don’t know it but you want to forward it is the interesting scenario), you cannot use any API since you simply don’t have the name which you could pass. If nothing more,

Re: Are Private name and Weak Map the same feature? and the Assoc API

2011-12-19 Thread Tom Van Cutsem
2011/12/19 Herby Vojčík he...@mailbox.sk I'd say this is not specialty of get trap. If you don’t know the private name itself (and the scenario where you don’t know it but you want to forward it is the interesting scenario), you cannot use any API since you simply don’t have the name which

Re: Versioning?

2011-12-19 Thread Xavier MONTILLET
Why use version 6; and not use version 6; ? Just to be sure ES 6 code breaks in old browsers ? And what do you mean by opt-in for ES6 ? New syntax ? Everything in ES 6 ? I'm thinking about weakmaps: - on the one hand, you want to use native weakmaps when available so you would want to opt-in

Re: Versioning?

2011-12-19 Thread Mark S. Miller
On Mon, Dec 19, 2011 at 10:21 AM, Xavier MONTILLET xavierm02@gmail.comwrote: Why use version 6; and not use version 6; ? Just to be sure ES 6 code breaks in old browsers ? And what do you mean by opt-in for ES6 ? New syntax ? Everything in ES 6 ? I'm thinking about weakmaps: -

Re: Versioning?

2011-12-19 Thread Rick Waldron
Mark, It was coined by Remy Sharp http://remysharp.com/2010/10/08/what-is-a-polyfill/ ...I still don't understand how it differs from shim Rick On Mon, Dec 19, 2011 at 1:48 PM, Mark S. Miller erig...@google.com wrote: On Mon, Dec 19, 2011 at 10:21 AM, Xavier MONTILLET

Re: Versioning?

2011-12-19 Thread Gavin Barraclough
As an aside (I'm not arguing for or against inline versioning here) isn't: use version 6; more backwards compatible? For example, consider the following: use version 6; with ({hi:Hi!}) alert(hi); I believe this is a valid program in ES5, that treating use version 6 as a

Re: Versioning?

2011-12-19 Thread Axel Rauschmayer
My understanding: - Shim: retrofit a new API in an older context. - Polyfill: “A shim that mimics a future API providing fallback functionality to older browsers.” On Dec 19, 2011, at 19:54 , Rick Waldron wrote: Mark, It [polyfill] was coined by Remy Sharp

Re: Math: n-th root, logarithm with arbitrary base

2011-12-19 Thread Erik Corry
2011/12/19 Axel Rauschmayer a...@rauschma.de: But wouldn’t that rather be a reason for making these functions part of the core language? MS have proposed log2, log10, log1p. This makes more sense to me. These already exist and are useful in other languages and are not too hard to implement.