On Tue, May 28, 2013 at 7:15 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
ES6 could provide a Mapping class, in a standard module, that works like
this:
https://gist.github.com/jorendorff/5662673
All those methods are generic. Map would be a subclass of Mapping, with
its
own fast
On Fri, May 31, 2013 at 8:05 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
On Tue, May 28, 2013 at 7:15 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
ES6 could provide a Mapping class, in a standard module, that works like
this:
https://gist.github.com/jorendorff/5662673
All
On Fri, May 24, 2013 at 8:28 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Fri, May 24, 2013 at 4:14 PM, Jason Orendorff
jason.orendo...@gmail.com wrote:
It seems rather heavyweight. You can already get about the same effect
just
by writing that wrapper yourself.
As I've argued and
On Tue, May 28, 2013 at 1:00 PM, Jason Orendorff
jason.orendo...@gmail.comwrote:
I still think WebIDL might be the way to go. After all it is WebIDL
support that makes your current spec language possible. But I have one more
possibly productive suggestion, which I'll try to post today.
ES6
On Tue, May 28, 2013 at 12:21 PM, Jason Orendorff
jason.orendo...@gmail.com wrote:
On Tue, May 28, 2013 at 1:00 PM, Jason Orendorff jason.orendo...@gmail.com
wrote:
I still think WebIDL might be the way to go. After all it is WebIDL
support that makes your current spec language possible. But I
2013/5/24 Tab Atkins Jr. jackalm...@gmail.com
What does the invoke trap do? It looks like it somehow covers the
p.foo() case? Can it handle var f = p.foo.bind(p); f(); as well?
Just pointing me to docs would be sufficient, if they exist yet.
Given that invoke() was only just now
2013/5/24 Tab Atkins Jr. jackalm...@gmail.com
The problem is that the Map#set method grabs an *internal property*,
bypassing Proxies, etc., so you can't defend against it.
Just to clarify, grabbing internal properties doesn't bypass proxies, not
as currently specced.
That's why
As I mentioned upstream, I don't think extending the Proxy API with hooks
for accessing the private state of every possible built-in is going to fly.
Here's a constructive counter-proposal:
The difficulty of your use case is that you ideally would want to use
inheritance to inherit all of Map's
Map-like objects people will want include:
- something that looks like a Map, but backed by something other than
[[MapData]], like DOM attributes, a JS object's properties, a hash table
that doesn't retain entry order, or a key-value store;
- an observable Map;
- a Map that generates new
On Fri, May 24, 2013 at 7:02 AM, Tom Van Cutsem tomvc...@gmail.com wrote:
As I mentioned upstream, I don't think extending the Proxy API with hooks
for accessing the private state of every possible built-in is going to fly.
Here's a constructive counter-proposal:
The difficulty of your use
On Fri, May 24, 2013 at 9:27 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
Map-like objects people will want include:
- something that looks like a Map, but backed by something other than
[[MapData]], like DOM attributes, a JS object's properties, a hash table
that doesn't retain
On 24 May 2013 18:55, Tab Atkins Jr. jackalm...@gmail.com wrote:
I simply don't understand why Javascript's Map apparently makes this
impossible, forcing all Maps to be any-any, and offering only hacks
(admittedly clever ones) that partially work if you want a restricted
type.
I haven't
On Fri, May 24, 2013 at 12:02 PM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Fri, May 24, 2013 at 9:27 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
Counterproposal: address this in WebIDL. Add a magic [Maplike] tag that
means something like: [...]
[...] It's not the *best*
On Fri, May 24, 2013 at 11:53 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
On Fri, May 24, 2013 at 12:02 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
On Fri, May 24, 2013 at 9:27 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
Counterproposal: address this in WebIDL. Add a
.
Sent: Friday, May 24, 2013 5:08 PM
To: Jason Orendorff
Cc: EcmaScript
Subject: Re: Non-generic traps for non-generic objects (was: Overriding Map/etc
with get/set hooks?)
On Fri, May 24, 2013 at 11:53 AM, Jason Orendorff
jason.orendo...@gmail.com wrote:
On Fri, May 24, 2013 at 12:02 PM, Tab Atkins
On Fri, May 24, 2013 at 2:35 PM, Ron Buckton rbuck...@chronicles.org wrote:
Another way to look at this is that there is no way to prevent a caller from
using methods from the superclass on a subclass. In other OO languages, its
much harder (or nearly impossible depending on the language) to
On Fri, May 24, 2013 at 5:52 PM, Tab Atkins Jr. jackalm...@gmail.com wrote:
On Fri, May 24, 2013 at 2:35 PM, Ron Buckton rbuck...@chronicles.org wrote:
Another way to look at this is that there is no way to prevent a caller from
using methods from the superclass on a subclass. In other OO
On Fri, May 24, 2013 at 4:14 PM, Jason Orendorff
jason.orendo...@gmail.com wrote:
On Fri, May 24, 2013 at 4:52 PM, Tab Atkins Jr. jackalm...@gmail.com
wrote:
The problem is that the Map#set method grabs an *internal property*,
bypassing Proxies, etc., so you can't defend against it. If I
On Tue, May 21, 2013 at 4:07 AM, David Bruant bruan...@gmail.com wrote:
David Bruant wrote:
Le 21/05/2013 04:06, Tab Atkins Jr. a écrit :
(One way to do this today is to subclass Map and provide my own
get/set/etc. functions, but I need to override a potentially-open set
(anything that
2013/5/21 David Bruant bruan...@gmail.com
Would it make sense to add specific traps for specific objects (Date would
have some specific traps, so would objects with [[MapData]], so would
objects with [[SetData]], etc.)?
Very much like functions currently have some traps that only apply to
Hi,
David Bruant wrote:
Le 21/05/2013 04:06, Tab Atkins Jr. a écrit :
(One way to do this today is to subclass Map and provide my own
get/set/etc. functions, but I need to override a potentially-open set
(anything that doesn't directly lean on my overridden functions), and
it doesn't
On Tue, May 21, 2013 at 4:07 AM, David Bruant bruan...@gmail.com wrote:
David Bruant wrote:
Le 21/05/2013 04:06, Tab Atkins Jr. a écrit :
(One way to do this today is to subclass Map and provide my own
get/set/etc. functions, but I need to override a potentially-open set
(anything that
22 matches
Mail list logo