Bug fix and clarification: What does "({}).valueOf.call(3)" return?

2009-02-22 Thread Mark S. Miller
In ES3, ({}).valueOf.call(3) returns a newly wrapped 3, and does on at least FF, Safari, and Opera. According to the present ES3.1 draft, it returns the unwrapped primitive 3. This is merely a mistake. We have previously agreed verbally, both on the ES3.1 phone calls and at one of the recent ECMASc

Re: parseInt and implicit octal constants

2009-02-22 Thread Breton Slivka
On Mon, Feb 23, 2009 at 10:13 AM, Garrett Smith wrote: > On Sun, Feb 22, 2009 at 9:30 AM, Allen Wirfs-Brock > wrote: >> David-Sarah Hopwood wrote: >>> >>>Herman Venter wrote: > > >> Finally, there is another approach to resolving this issue. Define a new >> global function, parseInteger, that d

Re: parseInt and implicit octal constants

2009-02-22 Thread Garrett Smith
On Sun, Feb 22, 2009 at 9:30 AM, Allen Wirfs-Brock wrote: > David-Sarah Hopwood wrote: >> >>Herman Venter wrote: > Finally, there is another approach to resolving this issue. Define a new > global function, parseInteger, that does the "right thing" and relegate > parseInt to Annex B. > That

Re: Object.prototype.link

2009-02-22 Thread Neil Mix
Can you describe this in terms of language features from another language? For example, the use-case you've provided could be accomplished with pointers in C. In C++ you could create a MutableNumber class and use operator overloading. Is that the kind of thing you're looking for? On Fe

Re: Object.prototype.link

2009-02-22 Thread memo...@googlemail.com
a and b are properties of object "this" (the global object). It has to work the same way like linking "x.a" to "y.b". link(this, "a", this, "b") does work with the function of David-Sarah Hopwood. 2009/2/22 Lasse R.H. Nielsen : > On Sat, 21 Feb 2009 18:52:06 +0100, memo...@googlemail.com > wrote

Re: Object.prototype.link

2009-02-22 Thread Garrett Smith
On Sun, Feb 22, 2009 at 6:01 AM, David-Sarah Hopwood wrote: > David-Sarah Hopwood wrote: >> memo...@googlemail.com wrote: >>> I'd like to use link(obj, target). >>> >>> E.g. >>> a = 10; >>> link(b, a); >>> a++; >>> b++; >>> print(b); >>> // output: 12 >> >> That would require a "catchall" mechanis

RE: parseInt and implicit octal constants

2009-02-22 Thread Allen Wirfs-Brock
David-Sarah Hopwood wrote: > >Herman Venter wrote: >> I appreciate that this proposal does not try to go all the way on >octal. I am not so sure this is a good thing or that it makes the >proposal more likely to succeed. > >I wouldn't be opposed to removing octal entirely from the spec, but >bearin

Re: parseInt and implicit octal constants

2009-02-22 Thread David-Sarah Hopwood
David-Sarah Hopwood wrote: > I have submitted a bug for this change to parseInt, with a test case: > That URL should have been . -- David-Sarah Hopwood ⚥ ___ Es-discuss mai

Re: parseInt and implicit octal constants

2009-02-22 Thread David-Sarah Hopwood
Herman Venter wrote: > I appreciate that this proposal does not try to go all the way on octal. I am > not so sure this is a good thing or that it makes the proposal more likely to > succeed. I wouldn't be opposed to removing octal entirely from the spec, but bearing in mind the section 16 wordi

Re: Object.prototype.link

2009-02-22 Thread David-Sarah Hopwood
David-Sarah Hopwood wrote: > memo...@googlemail.com wrote: >> I'd like to use link(obj, target). >> >> E.g. >> a = 10; >> link(b, a); >> a++; >> b++; >> print(b); >> // output: 12 > > That would require a "catchall" mechanism, allowing accesses to > nonexistent properties of an object to be handle

Re: Object.prototype.link

2009-02-22 Thread Lasse R.H. Nielsen
On Sat, 21 Feb 2009 18:52:06 +0100, memo...@googlemail.com wrote: > I'd like to use link(obj, target). > > E.g. > a = 10; > link(b, a); > a++; > b++; > print(b); > // output: 12 Here you are not linking properties of objects, or values at all, as your first post seemed to suggest. Instead your

Re: Object.prototype.link

2009-02-22 Thread David-Sarah Hopwood
memo...@googlemail.com wrote: > I'd like to use link(obj, target). > > E.g. > a = 10; > link(b, a); > a++; > b++; > print(b); > // output: 12 That would require a "catchall" mechanism, allowing accesses to nonexistent properties of an object to be handled. It's quite likely that such a mechanism